Comment Re:Performance .... anyone? (Score 0) 418
The results are usually either trivial or dangerous.
To pick two examples. Perl has had a map for many years which is just syntactic sugar for the foreach construct. On the dangerous side we have the new optional monad (Java's name for the Maybe Monad). You can use it trivially like this
Optional person = personMap.get("Name");
if (person.isPresent()) {
Optional address = person.getAddress();
if (address.isPresent()) {
Optiona city = address.getCity();
if (city.isPresent()) {
process(city)
}
}
}
On the other hand if you try and use it the way Maybe/Optional is really intended things blow up badly. The API aren't retrofitted to lift into the monad the way they should. So code will execute in sequence unless you catch exception in which case you are back to explicit exception catching. The primitives don't lift (there isn't optional int, optional char...), so methods don't lift smoothly
Essentially the less purity the less you can pull across non trivially. You can mix in some impurities (LISP) if you assume developers are very aware of theory.
So what ends up coming across are some nifty syntax from functional languages and a few minor features.