Hacker News new | ask | show | jobs
by JackFr 2014 days ago
> You don't really need language features, assuming your language has sum types, polymorphism and first class functions

Aren’t those features?

1 comments

My point is that Option::ok_or and Option::map aren't language features, they're just plain old functions written in the language; if they weren't there you could implement them yourself. You need some language features to implement them (e.g. you can't implement map without first-class functions), but those are general-purpose language features that you'd want to have anyway.