|
|
|
|
|
by w0utert
2618 days ago
|
|
In terms of generated coded, it is exactly the same. But that's not the point of optional types. The point of optional types is to force you to write checks for undefined values, otherwise your code will not compile at all. In the old-fashioned style of your example, you might forget to check for the possibility of a null pointer/otherwise undefined value, and use it as if it were valid. |
|