|
Kobayashi posted:I don't write code for my day job, so I'm much less knowledgeable than most of the people in this thread. I'm trying to get my head around optionals. At a high level, I think it's trying to prevent accidentally using a declared but uninitialized variable from crashing the program. So: yes. You can think of String? as a class that can either have Some String or None. In most languages you have to do something like code:
code:
|
# ¿ Jun 3, 2014 19:15 |
|
|
# ¿ May 7, 2024 04:43 |