4 ms·
Having used Haskell a lot, I still feel pretty fine about C++ or C# type systems. It's Java's that drives me absolutely insane. Type erasure makes me want to p
by gamegoblin 11y ago
Having used Haskell a lot, I still feel pretty fine about C++ or C# type systems.
It's Java's that drives me absolutely insane. Type erasure makes me want to pull my hair out.
- the_af 11y agoI agree that Java is painful to use, but why is type erasure the annoyance that you need to single out? Haskell does type erasure as well.
- gamegoblin 11y agoSomething I find myself wanting to do occasionally, that you can do in C#, is instantiate a generic type with a default constructor. Like if I have a generic type T, I'd like to be able to do `new T()`.
- codygman 11y agoI feel like that comment is a little disingenous or at least needs a caveat after reading this[0]. I know that casts are almost never needed in Haskell code whereas I needed them in my last Android application (correct me if there's another way). 0: http://stackoverflow.com/questions/12468722/does-haskell-erase-types http://stackoverflow.com/questions/12468722/does-haskell-era...
- the_af 11y agoThat stackoverflow answer explains Haskell does type erasure. No, it doesn't work exactly the same as in Java, but nobody claimed it did. The OP claimed Java's type erasure annoyed him, while also claiming he had used Haskell a lot. I merely pointed out Haskell also erases types. I cannot advise you on your Android application without knowing what you're trying to accomplish.