Live data from Hacker News

If Haskell is so great, why hasn't it taken over the world? (2017)

pchiusano.github.io

61–70 of 154 posts

Re: If Haskell is so great, why hasn't it taken over the world? (2017)

#61

i have railed/ranted (occasionally belligerently) about haskell after having a professional brush with it two years ago. haskell hasn't taken over the world because the community is haughty about haskell's giant warts. yes it's very welcoming and open to indoctrinating you on "best practices" but as soon as you diverge in the slightest (because someone before you diverged or because you need to do something unconvent…

This is not a valid argument. I don't know Haskell beyond basic fundamentals and I know that your argument is ridiculous.

Just consider C++ and boost::spirit. Overloading operators can lead to ridiculous syntax in pretty much any language that supports it.

C++ doesn't have any _real_ problem with overloading in _real_ code bases. I wouldn't expect Haskell to have this problem either. Being able to construct ridiculous code is not an excuse for a language not catching on.

Tooling is exactly the same point. Tooling in C++ land is completely ridiculous. In comparison to Rust there is no argument, Rust is strictly better. However, C++ is still doing quite well for itself in industry.

Also, Rust's type system is not linear, it's affine, you can declare a variable and not use it.

Re: If Haskell is so great, why hasn't it taken over the world? (2017)

#62

I spent a large amount of personal time becoming an intermediate Haskell developer from 2009-2015, culminating in landing a job doing exclusively functional programming for an analytics team in a large company. My experience made me give up on Haskell & functional programming entirel, despite my feeling that the principles of functional programming are often “better” than object orientation and other paradigms. The o…

Could I summarize your objection to Functional Programming in business setting as the fact that Object Orientation makes it simpler to model the businesses and thus easier to solve their problems? If you think about a Function it does just one thing. But real world "agents" that run a business do many things. An OO-class has many methods, not just a single input and a single output. And inheritance: Businesses differ…

I personally believe almost the opposite. Even when I write Python, I use classes sparingly and if I ever choose to get a lower back tattoo it would probably say “Inheritance Sucks” in Chinese or something.

Think of a constructor function for a class. It is so easy to shove new complexity in there. Just add new optional arguments, assign them as instance attributes, and off you go.

If you have a class like MonthlyReport, and all of the sudden your boss wants to know how many widgets per month you sell specifically in Narnia, well you can probably hack this into the existing methods of MonthlyReport very quickly.

Doing it once maybe isn’t so bad. But doing it a dozen times quickly leads to a bunch of functionality shoved into MonthlyReport that probably shoukd be refactored out, and lord help you if your boss all of the sudden says you need all of it to go into DailyReport, and you need a new YearlyReport class with overloaded behavior for FiscalYear, CalendarYear, and NarnianYear.

If I heard about a system like this, my guess would be that it’s got a crapload of copy/pasted code, constructors and general class methods with huge lists of parameters and switches, maybe a few subsystems where someone tried to rewrite this with misguided MixIn patterns and abstract base classes, and everyone is terrified to change anything because no one knows how it actually works.

Even an imperative design that just used boring modules of functions, maybe with a tiny amount of metaprogramming like decorators for repeated logic, would be waaay better, no functional programming needed. But well-crafted functional programming would be better still.

The problem is sociological. Business managers won’t tolerate being told, “No. I cannot get you this result for a daily Narnian calendar by tomorrow— for that, we’ll need to draw up a quick design plan to make sure we add it in a maintainable way.”

Functional programming mostly requires saying no, being careful, measuring twice and cutting once.

With object orientation, you optionally can push back, say no, and try to do it carefully, but you don’thave to because of all the different buckets of mutable state, you often can find a place to shoe-horn unplanned complexity in somewhere, and leave it for future people to worry about when the shoe-horned complexity causes a big problem.

Re: If Haskell is so great, why hasn't it taken over the world? (2017)

#63
post #4

Haskell is a young language, and the vast majority (99%+) of programmers have not learned functional programming. Another observation is that the programming industry does not care about correctness or writing stable software, since they have no liability for broken shit. There isn’t a strong push for writing consumer software that isn’t riddled with bugs.

30 ish years is young for a programming language now?

PL1 is approximately 54, and it was put together to cover the application domains of 2 previous language successes, Fortran and COBOL, which still live. Fortran is more than twice 30 years old, BASIC approximately 53, RPG 59.

Re: If Haskell is so great, why hasn't it taken over the world? (2017)

#64

Part of this is that Haskell is seen as a language by and for academics. You can't even read about the history of Haskell because it is only published through the ACM for a steep fee. So unless you are part of the academic circle you won't be exposed to it unless you are ready to invest. The biggest growth driver for Haskell is the financial world where it has seen quite a bit of adoption.

Which finance companies have even >10k line Haskell codebases

Re: If Haskell is so great, why hasn't it taken over the world? (2017)

#65

Part of this is that Haskell is seen as a language by and for academics. You can't even read about the history of Haskell because it is only published through the ACM for a steep fee. So unless you are part of the academic circle you won't be exposed to it unless you are ready to invest. The biggest growth driver for Haskell is the financial world where it has seen quite a bit of adoption.

Which finance companies have even >10k line Haskell codebases

https://wiki.haskell.org/Haskell_in_industry

Re: If Haskell is so great, why hasn't it taken over the world? (2017)

#66
post #57

The author notes the success of Go. Go's developers knew when to stop. Go is a mediocre language, but it has all the parts needed for server-side software. That's a big market. I suspect that part of the success of Go is simply because its libraries are heavily used. You know that the library is serving a zillion requests a second in Google data centers. Major bugs have probably been found by now. Go has one solidly…

In other words, Go is designed for practicality. It shows design consideration to favor engineering while Haskell, as far as I can tell, barely cares.

Re: If Haskell is so great, why hasn't it taken over the world? (2017)

#67

Because the industry isn’t dominated by well thought out solutions. Most programmers I talk to love the idea of spending time and using the perfect tools to design outstanding solutions to problems. They discuss how much they supposedly like to learn. But when push comes to shove, your 9–5 career growth is probably going to be best optimized by cobbling a bunch of Python together and shipping it. Especially if you wr…

But it doesn't seem too popular in the open source world either. The only large project I can think of that uses it is Xmonad.

Re: If Haskell is so great, why hasn't it taken over the world? (2017)

#68

Let's say you write the best image decoder library for the next great image format, and everyone wants it on every device that is connected to the internet. Writing it in haskell would mean that only haskell users, or people willing to link in a large runtime, could use it. So, you write it in C or Rust, so anyone can link it in and not care what it was written in. Maybe also write a native Java version, because that…

D can also link to only the C runtime library.

Re: If Haskell is so great, why hasn't it taken over the world? (2017)

#69
post #11

> "Avoid success at all costs." > I mentioned this at a talk I gave about Haskell a few years back and it’s become quite widely quoted. When a language becomes too well known, or too widely used and too successful suddenly you can’t change anything anymore. You get caught and spend ages talking about things that have nothing to do with the research side of things. Success is great, but it comes at a price. -- Simon P…

What are the cognitive defects associated with liking Haskell? I'm always happy to learn more about my cognitive limitations.

Re: If Haskell is so great, why hasn't it taken over the world? (2017)

#70

Part of this is that Haskell is seen as a language by and for academics. You can't even read about the history of Haskell because it is only published through the ACM for a steep fee. So unless you are part of the academic circle you won't be exposed to it unless you are ready to invest. The biggest growth driver for Haskell is the financial world where it has seen quite a bit of adoption.

> You can't even read about the history of Haskell because it is only published through the ACM for a steep fee

Not so! http://haskell.cs.yale.edu/wp-content/uploads/2011/02/histor...

I haven't ever encountered a Haskell-related paper or thesis that is paywalled? The authors put them on their personal homepages for anyone to access, usually. Not saying there aren't such cases, but in actual Haskell learning studying and working practice not my experience nor anyone else's that I heard from

Post reply on HN