Hacker News new | ask | show | jobs
by yxhuvud 2566 days ago
> changed what I expected from language was non-nullable types

I got the same revelation from the a lot more conventional [] looking Crystal, which don't solve it through optionals but through union types. Exposure to that kind of type safety to enforce non-nullability is really a watershed moment.

[] For values of convention that look like Ruby. Not everyone think that look is conventional enough.

1 comments

Optionals are union types: Optional<A> is the union of Unit and A.