re: Returning type-safe & non-nil failure in Crystal? VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION
 

Succinct and authoritative, thank you, sir!

I've been trying to avoid nil in crystal because I felt it was the "safe" thing to do (also I didn't want to have to call .as(...) so much).

I think I am finally understanding that it isn't the absence of nil values that provides the safety but Nil being a type that the compiler can check for and enforce proper handling of.

code of conduct - report abuse