4 ms·
I find it funny that Java scored very similarly to Haskell, when otherwise the languages are quite different.
by Tyr42 14y ago
I find it funny that Java scored very similarly to Haskell, when otherwise the languages are quite different.
- dons 14y agoJava : lots of syntax to fuzz, all have to be right. Haskell : few tokens, stronger checking (i.e no corecions), though Rosetta code is not as type-heavy as real Haskell code. I have a conjecture that Haskell examples designed by experts - with types in mind as we do in production systems - would have lower compile rates than the Rosetta examples, that are written mostly by non-experts without regard to maintainability. In production Haskell code, I will usually wrap Double values with newtypes, to e.g distinguish currency amounts, percent data and ratios from each other, specifically to guard against typos where I accidentally pass doubles parameters in the wrong order. Designing code with an intent to make it less vulnerable to fat fingers is certainly possible.