|
|
|
|
|
by dtwhitney
2033 days ago
|
|
Haskell simply makes you do a thing you should do: check that the thing you expect to be there is actually there. You can think of it simply as the compiler acting as a testing framework. On the other side there are things like TypeScript where selecting the 'n' index of an array does not give you a type representing the fact that the item may not exist, and thus does not force you the check if it does. You may call this "getting out of your way", but I don't see how this makes software less complex - it makes bugs more difficult to track down and necessitates more tests, which could simply be removed by an adjustment in types. TyoeScript/JavaScript is easier to learn, but dear God does it offer so many ways for your to shoot yourself in then foot. |
|