Hacker News new | ask | show | jobs
by nixpulvis 2288 days ago
But it's not.

A `Maybe<char>` has exactly one `None` variant. While an `int` has many, many negative values.

Also, just calling it `None` (or similar) makes clear what is meant, while `-1` is some magic value.

1 comments

> while `-1` is some magic value

It's a documented return value. Nothing magic about it.