2 ms·
IMO, its not just about what useful programs you can write. Its also about how much of the type system you need to learn to get the program to compile. For exam
by ufo 12y ago
IMO, its not just about what useful programs you can write. Its also about how much of the type system you need to learn to get the program to compile. For example:
function foo(f){
return [f(["1", "2", "3"]), f([1,2,3])];
}
function length(xs){
return xs.length;
}
foo(length);
Anyone can see what this Javascript program doing but to write the Haskell equivalent you would need to understand higher-rank-types and enable the corresponding language extension, which gets in the way of beginners.