Hacker News new | ask | show | jobs
by tunesmith 2750 days ago
You can get really far on Scala just by following a couple of principles.

1) Aim towards your functions depending only on the function inputs, to calculate a return value, with no side effects

2) Aim towards your functions having a return type that exactly describes the possible outputs of your inputs.

A lot of the magic after that is clever composition that, while having the benefit of making your code shorter and smaller and more "expressive", is also obfuscating to people that are less experienced.