Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Python is no more "multi-paradigm" than Haskell. In Python, you can write imperative code. If you squint a bit and don't mind some awkwardness, you can write functional code. I suppose you also have objects.

In Haskell, you can write functional code. If you squint a bit, and don't mind some awkwardness, you can write imperative code. (Actually, in my experience, even the imperative code you can write in Haskell is fairly elegant.) Sure, it does not support OO-style code without crazy contortions. On the other hand, it can support other styles like non-deterministic or logic programming.



Probably the most mainstream multi-paradigm language I can think of is Scala.

As the OP demonstrates, it's quite straightforward to write Java in Scala. At my company we mostly write Haskell in Scala. And having played a bit with Akka, I'm beginning to write Erlang in Scala.

What I'd love to see is a multi-paradigm language that isn't so ugly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: