News for hackers. Stuff that matters.
Re:A Pythonista's Review of Haskell by hopia on Friday January 31, 2020 @11:51AM (#22203141)
Java and C# at least should support (parametric) polymorphism via Generics. In Haskell you don't need GHC Generics to achieve parametric polymorphism though, it's used for different things.
Re:A Pythonista's Review of Haskell by rovolo on Friday January 31, 2020 @03:22PM (#22205258)
I think they mean type classes/constructors [1] since they're talking about fmap, though I'm not sure what the proper name is for that concept. What name would you use?

They're trying to say that Java doesn't support writing a single function like so:

    <T<A> extends Iterable<A>, A, B> T<B> fmap(T<A> iterable, Function<A,B> mapper)
I.e. you can't pass ArrayList<A> to a method which takes List<A> and maps to List<B> and know for certain that you get an ArrayList<B> out.

[1] https://en.wikipedia.org/wiki/Type_class#Higher-kinded_polym...

Re:A Pythonista's Review of Haskell by hopia on Friday January 31, 2020 @04:04PM (#22205714)
Well data constructors are a part of algebraic data types which don't really exist in OOP. Unless you consider the class itself (or an interface) or its constructor as the algebraic data type constructor, and its properties/parameters as the values.

I'm not so sure fmap would make semantically as much sense in something like Java as it does in FP.