News for hackers. Stuff that matters.
Re:Why is Haskell used so little in the industry? by debacle on Tuesday May 01, 2012 @11:11AM (#3914679)
I don't mean to be cruel, but Haskell is simply not a good language for 2012. It feels like I'm programming for 1983, with the poor syntax and silly idioms.

There's a reason that eight out of the ten top programming languages in use today are C or C descendants - C is a great language to read and write, and for 90% of programming tasks (and 99.9% of business programming tasks), how easy it is for the programmer to comprehend and express himself in the language is the biggest factor in productivity.

Re:Why is Haskell used so little in the industry? by jlouis on Tuesday May 01, 2012 @11:17AM (#3914726)
C and C descendants happen to be the primary reason we have not really moved forward any further than where we are right now. To build a mildly succesful C application, you needs lots and lots of code. The question is: Does it necessarily have to be so?

Haskell as a language is far more advanced and your "feel" might actually be right: You are now programming in the 80'es rather than the 70'es which most C-descendants really are programming in :)

Re:Why is Haskell used so little in the industry? by Amadiro on Tuesday May 01, 2012 @11:45AM (#3914887)
You need to write lots and lots of code to write a successful application in any language, really...
Re:Why is Haskell used so little in the industry? by debacle on Tuesday May 01, 2012 @11:37AM (#3914845)
To build a mildly successful C#, JavaScript, Java, Perl, or PHP application, you need very little code, and all of these languages are vastly more popular than Haskell because it is orders of magnitude easier to get things done in those languages compared to Haskell.
Re:Why is Haskell used so little in the industry? by batista on Tuesday May 01, 2012 @12:28PM (#3915117)
>C and C descendants happen to be the primary reason we have not really moved forward any further than where we are right now.

Really? This implies you have some knowledge of what would have happen if C/C-descendants did not exist.

It also implies that C/C-desc adoption was a historical accident, or an idiotic move, instead of something based on very pragmatic decisions. To write a performant program until at least 1990, from a word processor to a game, you needed not only C-level speed but also lots of tricks and twists to your code (ingenuity), most of which were only possible because of the low-level access C provides and the programmer's knowledge of the program's state (so a higher level compiler couldn't easily derive and do the same optimizations for generic programs). And sometimes you even have to drop in assembly. Remember all those 80's games (like Prince of Persia) written in assembly?

So, even if C didn't exist, it would have to be invented (or something much like it). Worse case scenario, we would be using assembly.

After the 90's, with 486's etc, the situation got better, in the sense that we could even afford garbage collection. Still, our expectations got bigger too. Whereas 256 graphics and SID sound on a largely uni-tasking system was good for the eighties (at best you have some expensive Unix workstation and you run X with 4-5 programs loaded, X-eyes included), we now want millions of color, multiple CD-quality sound streams playing, 10-20 heavy programs loaded at once, GPU compositors, streaming audio and video, anti-aliased fonts, etc etc.

So, still, a high level solution feels slow compared to C/C++ when it does today's state of the art (for 10-years ago or yesterday's state of the art, even Python or Javascript is sufficient). Same for UIs (where waiting for the user's actions is the largest slowdown).

As long as you get into the "cpu intensive" or "memory bound" issue, anything but C/C++ seems slow.

(C descendant's like Java/C#/Go etc are also slow --not arguing that. Any multimedia app done in Java, for example, is like a relic from the 90's).

Re:Why is Haskell used so little in the industry? by groovy2shoes on Tuesday May 01, 2012 @11:17AM (#3914723)
There's a lot of hand-waving here. Do you realize that C syntax predates 1983? Can you explain what it is about Haskell syntax that irks you? Can you provide examples of silly idioms?
Re:Why is Haskell used so little in the industry? by debacle on Tuesday May 01, 2012 @11:34AM (#3914829)
The C syntax predates 1983, but it works.

Haskell's operators are wonk:

[0,1,2,3]!!2

versus:

[0,1,2,3][2]

Clearly !! is a logical array indexing operator.

Re:Why is Haskell used so little in the industry? by eru on Tuesday May 01, 2012 @11:39AM (#3914854)
You can define your own operator, if you want to.

There are legitimate gripes you can have about Haskell syntax, but this is just trolling.

Re:Why is Haskell used so little in the industry? by debacle on Tuesday May 01, 2012 @11:43AM (#3914875)
Calling someone a troll because they disagree with you is pretty offensive.

And I don't want to define my own operator. I can define my own words in English as well, but I'd rather use the same words everyone else is using so it will be easier to communicate with them.

If Haskell were as great of a language as you say, it would be more popular.

Re:Why is Haskell used so little in the industry? by groovy2shoes on Tuesday May 01, 2012 @12:00PM (#3914970)
What you're saying is that you don't like Haskell's syntax because it's not C's syntax. The unfamiliarity card is not a legitimate card in the game of criticism.

> I'd rather use the same words everyone else is using so it will be easier to communicate with them.

Would you be happier if C was the only language, and everyone just had to use C?

> If Haskell were as great of a language as you say, it would be more popular.

This is completely non sequitur. Popularity has little to do with the advantages offered by a language. At one time, C was not so popular.

Re:Why is Haskell used so little in the industry? by debacle on Tuesday May 01, 2012 @12:10PM (#3915013)
What I'm saying is that C is ubiquitous because it has strong syntax, and Haskell is not because it doesn't.

I like C's syntax, but I also like Lisp's and Scala's and SQL's.

> Would you be happier if C was the only language, and everyone just had to use C?

If C were as powerful as a modern programming language (JavaScript) and had the standardization of a libraries that Perl or PHP has, then I'd be okay with writing C. The only reason I don't is because C has been improved upon. Haskell is a step back.

> This is completely non sequitur.

Of course it isn't. Popularity has a huge amount to do with the advantages offered by a language. If a language was crap, no one would use it.

At one time, C was not very popular, but in the last 20 years almost all of the most popular languages, year after year, have been C or its descendants.

Re:Why is Haskell used so little in the industry? by groovy2shoes on Tuesday May 01, 2012 @12:25PM (#3915102)
By now it's clear to me that your argument has reduced to "I personally don't like Haskell's syntax, therefore Haskell cannot generally be a good language."

If you don't want to use Haskell, that's fine. Don't use it. If you have legitimate criticism, I'd like to hear it.

Re:Why is Haskell used so little in the industry? by TheBoff on Tuesday May 01, 2012 @11:45AM (#3914890)
Can you explain what you dislike about it? It's a different operator, certainly.

I'm pretty sure that it has an "odd" shape, because indexing a list in Haskell is potentially O(n). The operator itself is essentially a warning...

Re:Why is Haskell used so little in the industry? by thu on Tuesday May 01, 2012 @11:37AM (#3914842)
This is the first time I see someone seriously dismiss, and choose, a programming language based solely on its syntax. Also the first time I see one to pretend Haskell makes it more difficult to express oneself because of the syntax.

Surely, you were talking about the comments syntax. They really make it horrible to express anything.

Re:Why is Haskell used so little in the industry? by pnathan on Tuesday May 01, 2012 @11:46AM (#3914891)
> This is the first time I see someone seriously dismiss, and choose, a programming language based solely on its syntax.

You've never read a Lisp thread with non-Lispers, have you? :-) The amount of whining about parentheses is incredible.

Re:Why is Haskell used so little in the industry? by debacle on Tuesday May 01, 2012 @11:55AM (#3914940)
To be fair, as a non-Lisper that knows Lisp, it's all about the libraries and the language-as-a-platform.

If WordPress was written in Lisp, I'm sure many more people would use it. It's sort of a chicken and egg problem, I guess.

Re:Why is Haskell used so little in the industry? by sblom on Tuesday May 01, 2012 @02:11PM (#3915651)
I've also seen an incredible amount of judgmentalism applied to Objective-C's message passing syntax. Does it look foreign to a speaker of classical C? Absolutely. But I found that pressing through the initial shock, I've come to realize that it's just another language syntax, and not particularly hard to either understand or type.
Re:Why is Haskell used so little in the industry? by debacle on Tuesday May 01, 2012 @11:40AM (#3914862)
I choose every language I use based on the expressiveness of the syntax. What other reason is there to choose a language?
Re:Why is Haskell used so little in the industry? by thu on Tuesday May 01, 2012 @11:54AM (#3914936)
Usually, expressivity in a programming language is not really a matter of syntactic constructs but a matter of semantic constructs. But choosing a programming language involves much more than semantic (or syntax). Depending on the situation, community, compilers and tools, libraries, consultancy houses, documentation and books, are all reasons to choose or not a language.

Some even says that the number of programmers available on the market for a language is important. I don't think it is a good reason but a related one is: your existing user base is composed of companies and consultancies with their own programmers; you can't abruptly choose a different programming language than the one they know.

Re:Why is Haskell used so little in the industry? by debacle on Tuesday May 01, 2012 @11:59AM (#3914964)
I would disagree. Semantically, we're reaching a point where most popular languages have a similar feature set (semantically speaking), and as new semantic constructs are created, they're quickly ported to other languages.

I agree with you about the 'platform' of a language, though. That's one of those things that you can't get away from.

Re:Why is Haskell used so little in the industry? by szany on Tuesday May 01, 2012 @11:44AM (#3914881)
Semantics.
Re:Why is Haskell used so little in the industry? by debacle on Tuesday May 01, 2012 @11:51AM (#3914920)
Why choose a language with good semantics if the syntax is awful?

Most languages today offer the same semantics - first class functions, objects, namespacing. Apart from that core, there isn't really a huge variance except for fringe languages that, generally, have severe syntactical limitations as a result.

Re:Why is Haskell used so little in the industry? by SkyMarshal on Tuesday May 01, 2012 @12:11PM (#3915030)
Disagree. Haskell is one of the only truly next-gen languages there is, primarily due to its ambitious design goal of software assurance - basically, it was designed from the ground up to better enable programmers to write error-free code.

The Haskell designers identified the main sources of errors in code as mutable state and side effects (network communication, writing to disk, etc), and then constructed a language that enforced isolation of that code into specific containers, monads.

All code outside monads is guaranteed to be purely functional, referentially transparent, immutable, and side-effect free. It's an idea that seems simple in hindsight, but is rather brilliant.

Add to that Haskell's green-thread concurrency and multicore/cpu parallelism is probably one of the best kept secrets in programming these days, and you've got an amazing language and platform for anyone who takes the time to shift to its paradigm.

Re:Why is Haskell used so little in the industry? by TheBoff on Tuesday May 01, 2012 @11:31AM (#3914813)
Really? I've found Haskell's syntax and overall design to be the most elegant of anything I've tried. I really appreciate the lack of unnecessary punctuation which litters other languages.
Re:Why is Haskell used so little in the industry? by jinfiesto on Tuesday May 01, 2012 @11:35AM (#3914836)
I can understand the sentiment. I was a Lisper before I came to Haskell, and initially, the syntax seemed verbose and unnecessary. As it turns out though, the syntax is very simple and well designed. There's just a lot of optional sugar, which also happens to be well designed.