Hacker News new | ask | show | jobs
by thesz 1290 days ago
Okay, I'll bite.

Java could be a much nicer language with much less allowance for architectural space programs.

Type classes were introduced into Haskell as early as 1988-1989. At 1991 you could have programming in language with parametric polymorphism, type inference and principled (albeit called ad-hoc) overloading, there was at least one.

The ST monad, one of the first effect-containing abstractions, was introduced as early as 1992 - I think it was close to introduction of IO monad.

So, at the time Java was introduced in 1995, it could have all these nice properties which greatly simplify programming and make architectures easier to understand and more future-proof (Haskell's solution to an Expression Problem [1] is one of the simplest, it uses what was available in 1995, more or less).

[1] https://en.wikipedia.org/wiki/Expression_problem

Thus, we could have a programming language that makes architecture rocket launch much harder. But we did not.

The slogan was "write once, run anywhere" without any regards on how much is needed to be written or how to safely compose what is written.

1 comments

I guess you never seen Haskell code in production with endless GHC feature flags...
I saw, of course. I use Haskell professionally for 15 years now.

These feature flags are not "architecture space odyssey," though. Usually they reduce boilerplate, often significantly.

They are also artifact of Haskell being "research language," as mentioned in video above.