finished ch8.1

This commit is contained in:
2025-01-17 20:51:38 -07:00
parent 40a722d93d
commit 1624bbb975
6 changed files with 193 additions and 18 deletions

View File

@ -718,7 +718,7 @@ can implement behavior in relation to an enum
## The Option Enum and Advantages over Null types
this is a specail case where the variants are nothing nas something
this is a special case where the variants are nothing nas something
this is part of the standard library can can be included
this should be handled so that the compiler can check for handling all types
@ -727,9 +727,9 @@ this then handle the case of what if it is empty
a feature of rust is excluding null references
if you try to use a null value as a not null value you get an error
this is due to null or not null as pervasive and extrememly easy to make this kind of error
this is due to null or not null as pervasive and extremely easy to make this kind of error
null is still useful for expressing a vlaue that is not present or not valid for some reason
null is still useful for expressing a value that is not present or not valid for some reason
this is a problem of implementation
rust doesnt have nulls but can be expressed as the enum Option<T>