Different languages have some little things that make the life easier: for devs, their QAs and customers. The app is fast and behaves correctly, the code looks simple and understandable - everyone is happy.
Units of Measure - need to admit, I was a long time sceptic (c’mon, how can you get kg and m^2 mixed up?)… until was given a spreadsheet with a “correct formula”, but its result didn’t make sense at all.
Generic Restrictions - one of my favourite features! A lot of people don’t even know about it. That’s unfair. The most complex example I could think of - a static member with out-parameter) is included. But as always - use with care, it might become quite cryptic.
Immutability as a default - mostly for the devs with C# or similar background. Great to be sure the things won’t change.
Nulls and Options - the classic.
Discriminated Unions and Pattern-Matching - invalid states shouldn’t have a possibility to appear (and yes, sometimes it’s better to forget about the underscores).
Let the compiler help you!
- simplified a bit [return]