mirror of
https://github.com/darkicewolf50/RustBrock.git
synced 2025-07-06 11:07:12 -06:00
finished ch8.1
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user