I mean, we hardly ever have pure functions, right? But in the code, say, in Java, people pretend to have pure functions, sighing and doing something when it turns out kaboom those are not pure functions. String.charAt, Integer.valueOf(), etc, they are not functions. I mean, they are arrows in a Kleisli category for a certain monad, but people pretend not to notice it.
Haskell, on the other hand, at least ideally, disambiguates between pure, total functions and the arrows that make sense only in a certain Kleisli category, forcing people to explicitly use something monadic.
To me, this is similar to Java generics (which Java people kind of hate) that force people to write a more type-safe code.
no subject
Date: 2011-02-10 03:20 pm (UTC)Haskell, on the other hand, at least ideally, disambiguates between pure, total functions and the arrows that make sense only in a certain Kleisli category, forcing people to explicitly use something monadic.
To me, this is similar to Java generics (which Java people kind of hate) that force people to write a more type-safe code.