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

Language wars bore me. I've got pretty decent proficiency in C, C++, Java, Python and Javascript and I honestly like them all.

I use C to really get what happens on the metal. I use C++ to leverage C and C++ libraries for perf critical applications quickly. I use Java like C++ where it makes more sense - Android, or availability of libraries etc. I use Python to prototype and quickly express complex ideas and determine their perf characteristics. I use Javascript for frontend web dev which communicates with json back-end APIs that are language/platform independent services that scale out horizontalty.

I have 2 main rules.

If the question is to learn one important thing or another - I learn both. Then when I come across a new problem I solve it with a combination of the tools at my disposal.

Hence this is why I am currently learning Emacs, lisp, clojure, Scala and Haskell to round out my languages with maybe a little Ruby thrown in. This will take me a few years.

In the end programming is just about getting things to screen quickly and correctly. Seen from that viewpoint most languages are very similar at heart.



>Language wars bore me

The Haskell vs. everything else language war really is important though. All the languages you mention are basically the same thing with slightly different syntax or a slightly different runtime environment. Haskell, on the other hand, revolutionizes the way you approach code. Or at least it did for me.


> The Haskell vs. everything else language war really is important though.

What is remarkable about Haskell is that it builds upon bleeding edge programming language research. While I think that Haskell vs. everyone else is just another language war, I find it a real pity that "mainstream" languages seem to categorically ignore everything that programming language and compiler research has come up with in the last 30 years.

I'm still waiting for someone to find a sweet spot between Haskell and the more mainstream languages. A language that has a dynamic feel to it but is a statically typed (with type inference, of course) safe language that compiles to fast and efficient native code.


Yeah I'm not so sure. If Haskell is so great why isn't it dominating? Where are the Haskell phones, apps, services etc?

Don't get me wrong - I enjoy it. But I've learned a few things throughout my life. First, the one true crowd is always wrong. Two, if it's so good - use it, and prove it.

A lot of functional stuff is a ton of gushing talk - but no product walk.

When Haskell runs on billions of devices or serves trillions of pages or produces trillions in revenue call me. Otherwise, I'll just keep shipping with my lame proven product producing languages.

Functional languages have so far been all talk and no walk.


You do have a few cool, real-world products out there in Haskell (eg, git-annex, darcs). But to be fair, there is a fairly steep learning curve.

Once upon a time, at my old company, a guy came to an interview. He was very experienced in PHP, having used it to build websites as a freelancer for something like 10 years. Did he know object-oriented programming? He'd heard about it, it was probably good for larger teams. Because he'd just been working with the same techniques all these years. And the sad truth is, your average programmer is likely to be like this guy. In which case, you want to give him a solid language, which is aimed at preventing him from shooting off his own foot, and does not feature many complicated concepts, like Java.


> If Haskell is so great why isn't it dominating?

I'm not sure whether Haskell is really that great since I've never got around to really learn it (though I'd love to once I have enough spare time) but I think the dominating languages will be C-likes for a long time. Haskell is too far off from what average Joe Programmer is used to. Most people don't care about a new approach or don't want to invest time learning since the tools they use already work great.

I've learned a few things too, among them, that the majority usually isn't as right as you'd think. Especially in crafts like programming there are habits involved and habits are hard to change. Me, personally, I really like Haskell from what I know about it, simply because it's different.

However, I think there is no "one true paradigm". OOP goes horribly wrong for some things, just as Procedural gets horribly complicated for others and I'm pretty sure Function has a few drawbacks as well. Our real problem is the "use this, not that" mentality. Use what is appropriate for the problem you're trying to solve. That's why I like multi-paradigm languages like Python.


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.


I didn't mean to imply that Haskell was some "perfect language" just that you were wrong to imply that all programming languages are essentially the same. Python, Ruby, Java, and c are all essentially the same, but Haskell, Lisp, Agda are fundamentally different and learning the former groups of languages doesn't really reduce the learning curve in learning the latter.


Yeah that's not really true either. Haskell is functional.

All that means, and all that ever meant, was that the entire language worked around pushing static data into static functions and giving static returns.

I can do that in C, C++, Python, Java and Javascript. The only difference is that it is really the only way I can use Haskell - whereas the other languages are highly flexible, adaptable and actually help me ship product. Most of my APIs work essentially like Haskell - static pre-determined data in, static data out - and the back-end implementation is irrelevant for consumers.


Disclaimer: I'm a newbie in Haskell. I do, however, have experience in Java, Python, Javascript, and even C/C++.

My understanding is that you claim that all these languages can be made to offer you the same benefits as Haskell. I hope I'm not misrepresenting your position, but this is preposterous.

None of these are built around the concept of dumb, immutable data structures and stand-alone function (C/C++ can work with immutable data structures, but most data structures I have seen are mutable). Java is almost completely designed around mutable data structures with associated behaviour (objects), up to the point where you don't have standalone functions.

So, sure, you can have copy constructors everywhere, and static methods (say bye bye to dependency injection...). But it's not idiomatic code. You are fighting against the language and the ecosystem, and the only thing that will likely result is inefficient, bloated code which will get refactored out when it needs to be modified by somebody else than you.

Now, maybe you limit this to your API, but claiming that "the backend implementation is irrelevant for consumers" is a cop-out. Immutable data buys you safety. Maybe you know your code is safe, you don't have any dangling pointer issue anywhere, no concurrency issue, etc. Unfortunately, this might very well not be the case next time you or somebody else refactors your code.

There are certainly reasonable arguments to be made against Haskell (learning curve, Cabal, size of the ecosystem, difficulty of reasoning about performance...). But claiming you get the same benefits in terms of safety out of traditional imperative languages is not one of them. Not to mention higher-level functions, etc, that you certainly are not about to experiment in Java.


Nah. Just like the business side is constantly trying to figure out ways to not have to use programmers anymore, Haskell is all about trying to figure out ways to make mathematicians more useful


Actually I'd rather stick with what we have. Worse is better and all that. I find Haskell to be like reading a cross between perl and the dictations of a crazy person chanting in tongues.

The underlying principles however are damn good, but they are not enough to salvage it.




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

Search: