9 ms·
If Haskell is so great, why hasn't it taken over the world? (2017)
- paulgramcracker 9y agoHaskell 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.
- boothead 9y ago30 ish years is young for a programming language now?
- paulgramcracker 9y agoHaskell is the youngest language that isn’t derivative.Monads for IO weren’t being seriously used until the late 90s. All the imperative C derivative languages are much older.
- Smaug123 9y agoA very young language that is (to my knowledge) not derivative of older ones unless you count Excel: https://www.luna-lang.org https://www.luna-lang.org It comes with C, JS, and Haskell interoperability, and it's implemented in Haskell, but the heart of the language is its visual representation. I have personally never seen anything like it before.
- lucas_membrane 9y agoPL1 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.
- hugelgupf 9y agoHaskell is 28 years old.
- walshemj 9y agoAnd in recent poll of programming popularity Haskell came just behind PL/1 :-) I bet there are not many hn regulars who have used Pl/1 in production. Its also funny that Paul seems to think there where no high level languages before c
- lalos 9y agoSome devs prefer being woken up on their on-call duty to fix a Javascript bug that could've been caught by GHC. It only makes sense when you put on the business hat, e.g. the big pro is that they are first to market, etc.
- ska 9y agoSee also, Lisp.
- phoe-krk 9y agoLisp already took over the world. Most of the fancy things that originated in Lisp were adopted by other languages, and thanks to Lisp, these other languages are bearable and actually useful now. Haskell's one of these languages.
- badrabbit 9y agoIt takes an insane amount of time to compile ghc. I can't stand apps that use it because of that. Could take hours on some machines, would have considered riding on that bandwagon if it wasn't for that limitation.
- josteink 9y agoI think it’s pretty safe to assume this limitation/problem affects almost nobody else, so not really relevant for most people. Also: how do you run running Firefox and Chrome? Do you download and build the whole chain of dependencies and build tools needed to build and run those? And if so, why?
- badrabbit 9y agoI actually use firefox or chrome so that's a non-issue. Ghc is a dependency not the main app,therein lies my complaint. Depending on the use case I might complile some applications and by no means was I implying others should build from source as well. It's just that I have run into situations where a Haskell app pulls ghc and that needs a source build. If I ever build something in Haskell then there is a chance others might go through that as well. I never had that problem with any other language (even a heavy weight lan like java).
- 101000010101 9y agoYou can use prebuilt binaries of ghc. If you don't need the bleeding edge builds.
- Y_Y 9y agoI use lots of versions of GHC across several architectures, and can't remember the last time I compiled GHC. I think you must be doing it wrong. It's not without its flaws, but `stack` can do a lot of the work for you too.
- badrabbit 9y agoOn some platforms that build from source haskell apps pull ghc as a dependency and build it from source as well. I try to avoid those apps but it is getting harder.
- reikonomusha 9y agoBecause 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 wrap around it a bunch of buzzword frameworks and deployment technologies. Unless your boss or your boss’s boss are technical and opinionated about good software engineering, nothing is going to be optimized for such. And a $100k+/year paycheck is a hell of an amount of inertia. A two month boot camp is sufficient to pump out an individual who can be opinionated about their technology choice, and even produce an individual who can duct tape some services together to produce some semblance of value. Likewise a stock 4-year compsci degree. Be it a boot camp, a university, an online coding school, or an Ivy League: They’re not going to teach you Haskell (or Lisp or ...), they’ll teach Python, because it’s easy, even if it rarely produces simple solutions. And once somebody has put in the energy to learn one thing that has become profitable for them, they’ll need an enormous amount of rationalization to learn and invest in something else.
- opnitro 9y agoInterestingly, the comp-sci program at University of Maryland does start with a list-esque system. They start with a very basic language and slowly add new features throughout the first course.
- reikonomusha 9y agoMy writing is of course a bit hyperbolic. Some universities do teach non-imperative and non-Modula-style-OO as a part of their computer science course. But my experience shows that, unsurprisingly, fresh grads have the most comfort with a sprinkling of the most popular languages. To me, this is an indicator that industry-popular has tremendous influence on education-popular. For computer science, I disagree that industry should have such steep bearing on the construction of a good computer science education. For something like a vocational program, trade school, or whatever else that is close to SW engineering, letting the industry strongly influence the program is agreeable.
- Y_Y 9y ago> "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 Peyton Jones There's not much in the way of marketing for Haskell. There isn't any drive to make it super-simple like Python, or super businessy like C#. It's fast if you make it so, but it's never going to be as fast as C. The cognitive defects required to like it are far less prevalent than those of JS-lovers. It's not built for the mainstream, even though it'll happily run GUIs and games and webpages and chat servers and whatever else is cool. Even if it wanted to, taking over the world takes a lot of effort and luck. And it doesn't want to, and spends its effort and luck elsewhere.
- pitaj 9y agoDid you just call JS-lovers and Haskell-lovers cognitively defective?
- kbenson 9y agoI read it as more of an assertion that loving any language requires cognitive defects, some a bit more than others.
- Smaug123 9y agoIt's not an uncommon meme that programmers and mathematicians possess a weird twist in the mind that allows them [in the strong form of the meme] to do, and [in the weak form of the meme] to enjoy doing, what they do. If you grant that, then it's a small step to admitting the existence of different sub-twists that incline you towards different parts of the abstract space. If you don't grant that, then consider it a rhetorical device for pointing out that comparatively few people like Haskell versus JS.
- pitaj 9y agoWhy the word "defect" though? There must be other words that are less controversial. Maybe "abnormalities" or "specialities"?
- mlevental 9y agoi 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 unconventional) they're completely obstinate about how ugly the language/experience can get. the most of obvious instance of this is point free form combined with overloaded operators combined with 8? arities. if you bring this up on r/haskell or #haskell you will get shouted down about how it's not best practices to abuse that so why even bother discussing because you can write unreadable code in e.g. python. this is absolutely true but the ugliest python is still clearer than the brainfuck homage that haskell turns into with stuff like $<><>$%%^^^ a b (@@@<> c d) $$$ e f the point here is not to rehash the debate but that no one takes this complaint seriously because elegant haskell is the one true scotsman and everyone else's haskell is irrelevant. another obvious thing is the complete lack of good tooling. stack/cabal/cabal-sandboxes/another cabal thing that's been created since i stepped away last year. there's no ide because real programmers write code using butterflies flapping their wings so why would you need anything other than cobbled together vim/emacs plugins. wanna debug? set a breakpoint in ghc but you can set breakpoints in ghc only 20 calls deep! don't even get me started on how slow the compiler is. does anyone listen to these complaints? no. why? my hypothesis is that it's like a fraternity with a hazing ritual (combined with many serious cases of stockholm syndrome). i think a fair comparison is rust (despite being imperative). linear types are probably as foreign as purity/immutability to people and yet rust has 10x more mindshare than haskell. why? because rust maintainers care about ergonomics! i could go on but i'm sure i'll get responses that chastise for not sticking with it long enough or not putting in the work or something else when the reality is that it wasn't worth it - i wanted a strong type system and the price i had to pay for it was too high. plenty of other strongly typed languages (ocaml, rust, f#) without all of the pain of haskell and the intransigence of the community.
- galaxyLogic 9y agoGood rant and thanks for the example. Seriously, is this really Haskell: $<><>$%%^^^ a b (@@@<> c d) $$$ e f What does it do?
- jeffdavis 9y agoLet'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 can already run on billions of devices.
- galaxyLogic 9y agoMakes a lot of sense. Haskell comes with baggage and has an impedance-mismatch with other commonly used languages. Similar reasons must have been to blame for the demise of Smalltalk. The best solution of its time many believe, but not easy to integrate with other languages and other ways of doing things. Also let me add it was difficult to create small Smalltalk programs that wouldn't require most of the base-library to be tagged along. Then you couldn't import it to another environment where the base libraries were somewhat different.
- vapourismo 9y agoGHC can produce native libraries just like C or Rust.
- reikonomusha 9y agoBut you carry around a runtime with managed objects that can’t be freely traded across the boundary to C libraries.
- vapourismo 9y agoCertainly it isn't the most attractive solution - still it is possible and works well. When it comes to moving things across FFI barrier, that is also very possible as there are all kinds of types (including stable pointers) in the Foreign.* modules that map onto C types.
- wtetzner 9y ago
- galaxyLogic 9y agoI think it's a question of inertia, people and organizations do things the way they have been doing them for some time. It has worked so far since the business is still up and running, so why take a risk and change. Choosing a not widely adopted solution even if it would be somewhat better than others is always a risk. Also it's not a question of whether to Haskell or not. There are many more choices, each with their pros and cons. It's a bit like with religions, why should I pick just one :-)
- wirrbel 9y agoIf you look at software at various scales, Haskell does a lot to get the finely grained and maybe even medium grained parts right and correct. Yet, I don't see a convincing value proposition for Haskell for the coarser grained scales. On that level, the benefits of Haskell as a language dont shine anymore as brightly, and this is an area that many teams struggle with. And oh: Haskell's lazy evaluation is the reason why I wouldn't like to use it within the business context, introducing all kinds of weirdness I don't want to have in a business context.
- diegoperini 9y ago> ...introducing all kinds of weirdness I don't want to have in a business context. Despite being a Haskell worshiper, I strongly agree with this.
- wirrbel 9y agoI consider myself to be a haskell fan (a 95 percenter, as I am not so happy with a few aspects, while being overall really positive about it). Unfortunately, the Haskell community is quite hostile to everyone not in line 100%.
- tome 9y ago> Unfortunately, the Haskell community is quite hostile to everyone not in line 100%. Could you say a bit more about what you mean? This discussion is one of the highest voted threads ever on Haskell Reddit and suggests that many prominent Haskellers are not shy about offering criticism of the language: https://www.reddit.com/r/haskell/comments/4f47ou/why_does_haskell_in_your_opinion_suck/ https://www.reddit.com/r/haskell/comments/4f47ou/why_does_ha...
- wirrbel 9y agoOf course my statement is a statement of a subjective perception (I don't conduct empirical studies on this), also you'll find criticism and discussions about stuff in the Haskell community (which is fairly large). However, my impression in other language communities, even in those, that are tightly-knit and feature a certain "cult of pride" (such as Python) I think flaws and shortcomings are discussed much more openly. Part of the problem is, that (some) Haskellers are pretty quick to insinuate that the person complaining or asking "provocative" questions does not understand and should educate themself more. I remember being rudely shut down when suggesting that Haskell docs could benefit a lot from a few introductory examples here and there (because the type signatures tell it all, you know!) It doesn't help that some Haskell enthusiast seem to be allergic against mentioning of certain words by the uninitiated. I think Matthew Rocklin (cool guy, admirable programmer, definitely with a mathematical education) once blogged and mentioned the word monad as an example for code with unnecessary abstraction/complexity IIRC. I read some nasty twitter remarks from people who were not capable of extracting the context and the intent from the surrounding text. I think the cabal/stack schism has brought at least some change into the community and I see improvements. Until there are some massive improvements, I respectfully decline to actively participate in that community and restrict myself to occasionally consume Haskell material to educate myself.
- grosjona 9y agoThe reason why Haskell didn't succeed is because programming languages don't actually matter. The best programming language is the one that is used by the most developers in any given field. All other criteria don't really matter. You can add as many constraints as you want to the language but it's not going to stop developers from writing bad code. The bottleneck with programming is human incompetence not programming languages. The language changes nothing.
- robotmay 9y agoFrom my own experience, Haskell is hard to learn. I have no grounding in maths, but that hasn't stopped me learning most languages. It's a pretty massive barrier to Haskell though, and I find that a lot of the community really struggle to explain things in terms that non-haskellers will understand. The biggest problem I've found is a real inability to explain _why_ the things it does are cool, or what real-world applications they have. I must admit that I also don't think it's a very pretty language. I like my code to be easy to read, and I just don't feel like Haskell fills that requirement. But that's obviously very subjective. At the end of the day, I've found Rust more fun to learn and use, so I've been putting my time into that lately. Haskell is cool, but the time investment is high and the community is small, and I like to build things, rather than spend hours trying to figure out what a string of symbols mean.
- wink 9y agoSounds relatable. I've tried to have a look at it a couple of times and usually gave up. And it was never fun, and I usually enjoy trying out new languages a lot. My only positive experience was when I finally got something done in PureScript, which, for lack of knowledge, looks very similar. I especially detest languages with overly an overly "cryptic" alphabet of non-word modifiers, operators, etc. Perl was bad (but I've come to like it, 20 years later), Scala was worse and Haskell takes the crown with all the <*> and <=> and so on :|
- wwwater 9y agoI think it's hard to explain why the things it does are cool, because it's related to the aesthetic sense of beauty and it's very difficult to explain that one. It's like you take a person who is doing number theory, and you ask them to explain why they are so fascinated that you can approximate prime numbers distribution with a particular function. I think it's related to aesthetics of seeing how things are connected into a "bigger picture". It gives you an immense sense of beauty, once you are able to see that things, that you thought are not related, are connected into a bigger picture, and are actually very much related. In Haskell a lot of things are about this "bigger picture", while in many popular languages the things are just a bunch of practical tools, that have nothing to do with each other.
- 9y ago
- mlthoughts2018 9y agoI 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 only language-specific thing that turned me off of Haskell in a significant way was that so many important concepts in Haskell are implemented via pragmas that extend the language and either enforce syntax restructions, enable totally new (and often esoteric) syntax, or change the meaning of existing syntax. This is really painful and makes you generally avoid great mew features and artificially limit yourself to more basic designs because of the learning curve and how committed to one siloed set of patterns you can become. It reminds me of Dennis’s coffee shop idea in 30 Rock: Dennis: One word. Coffee. One problem. Where do you get it? Liz: Anywhere, you get it anywhere. Dennis: Wrong. You get it at my coffee vending machine. in the basement at K-mart. You just go downstairs. You get the key from David. And boom, you plug-in the machine. ^^ that’s what it feels like reading Haskell tutorials when all you want to do is multiple dispatch or heterogeneously type some built-in container, simple things in so many languages. This alone wasn’t what put me off though. The real problem is sociological. Most companies hardwire a feedback loop between development teams and product or business managers that teaches developers they will be rewarded for their ability to unsafely hack things into a Jenga tower of system components for the sake of rapidly addressing ad hoc business questions even when, perhaps especially when, nobody has the slightest idea if answering the ad hoc business request is likely to be worth the additional instability the hacks will put into the Jenga tower. This is very nearly philosophically at odds with the spirit of functional programming, from a first principles level, which means even if you eke out a platform capable of dealing with this in a functional paradigm, youknow for sure that the business willnot see your work as valuable, and safety guarantees, correctness proofs, automatic parallelization, etc., will often notbe rewarded, meanwhile just hacking stuff into some C++ or Python codebase that “just works” will be rewarded. It’s not a satisfying phenomenon, but it convinced me that it’s not worth investing any more of my time into functional programming.
- mlevental 9y ago>The only language-specific thing that turned me off of Haskell in a significant way was that so many important concepts in Haskell are implemented via pragmas that extend the language and either enforce syntax restructions, enable totally new (and often esoteric) syntax, or change the meaning of existing syntax. god the ghc extensions. good luck figuring out why something is happening that you don't expect.
- dang 9y agoDiscussed at the time: https://news.ycombinator.com/item?id=13450828 https://news.ycombinator.com/item?id=13450828.
- jchw 9y agoI agree with this from my limited experience. However it feels like this ends abruptly. Did I skip over something or did I miss how we could remove composability boundaries at IO?
- leowoo91 9y agoBecause imperative languages require less optimization (hw wise) at first sight.
- agumonkey 9y agobecause the world is too short
- shp0ngle 9y agoJust an advice: read the article before writing a comment.
- olliej 9y agoI also agree with you. The author’s assertion that Haskell has failed in the real world due to the Illuminati is clearly wrong. ;D
- jacquesm 9y agoPart 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.
- mlevental 9y agoWhich finance companies have even >10k line Haskell codebases
- dualogy 9y ago> 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/history.pdf 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
- jacquesm 9y agoCool, thank you!
- danharaj 9y agoI've done a 9-5 in mostly Haskell since 2013. If you have specific questions about using Haskell in production, I can share my experience. If you've had a bad experience with a piece of tech and draw a broad conclusion, I think it's reasonable if unfortunate that it left a bad taste in your mouth. But I also think there's a brighter picture to paint :)
- muxator 9y agoMy two cents: because, more often than not, worse is better. And, recognizing that worse often wins, maybe we should consider the possibility that what we were categorizing as worse, was actually solving a different, more concrete problem.
- acdha 9y agoYour last point is really key: programmers love to decide that one or two favorite features are game changers but no real-world decision should be that simple. I’ve seen people dismiss Python’s readability as a simple feature which anyone could copy but then decline to do so because they didn’t really respect that as a goal (“it’s just for newbies”, etc.), despite the mountain of evidence showing that it deserves more serious consideration.
- acdha 9y ago(Oh, and since I left it out earlier: I’ve loved seeing the Rust team take usability issues so carefully. That’s a great model for the field.)
- Animats 9y agoThe 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 debugged library for each major function. Some other languages have a dozen half-debugged partly finished libraries. I once discovered that the all-Python connector for MySQL failed when you loaded more than a megabyte or so with LOAD DATA LOCAL. It passed the unit test, but clearly nobody was using it in production. There's an intermediate stop between imperative programming and functional programming - single assignment. Variables are initialized once and are then immutable. This is becoming the default in newer languages such as Rust and Go - if you want mutability, you have to ask for it. This gives you the immutability advantages of functional programming without the run-on sentence syntax. Also, results have names, which improves readability, and give you something to display when debugging.
- tanilama 9y agoIn other words, Go is designed for practicality. It shows design consideration to favor engineering while Haskell, as far as I can tell, barely cares.
- dirkt 9y agoHaskell actually doesn't care by conscious choice: It's meant as a research language, and has "avoided success at all costs" (to use the tongue-in-cheek quote) to retain the freedom to play around with things. Which in turn lead to quite a few inventions that are now being copied by other modern languages (like Rust), though they rename them to make them less scary (apparently programmers are easily scared by names ... like the one that starts with M.). That's a bit sad. On the other hand: Imitation is the sincerest form of flattery.
- splintercell 9y agoIt's actually "avoid (success at all costs)", rather than "avoid success, at all costs".
- mmt 9y ago> “It’s too hard to learn” (If your pet technology were 1000x more productive than, say, Java, would this learning curve really be a substantive barrier? I think the simple answer is "yes". It doesn't matter how much more "productive" something is if the vast majority of people simply aren't capable of learning it (or learning to use it well enough or doing it in a reasonable amount of time or whatever). He does go on to point out: > Though this question is more complicated than you think And suggests one read his more detailed treatment of the question, including what I found most relevant, which is a more nuanced treatment of the notion of productivity, having to do with labor costs, fungibility of that labor, market competition, and overall limited resources. https://pchiusano.github.io/2016-02-25/tech-adoption.html https://pchiusano.github.io/2016-02-25/tech-adoption.html https://news.ycombinator.com/item?id=17114935 https://news.ycombinator.com/item?id=17114935 I would expect that any technology that can be classified as sufficiently exotic is viewed as a huge risk, one not worth taking, by larger companies, which has traditionally included obsolescent tech and bleeding-edge/unproven tech, but easily includes a language that's too hard for the average programmer learn.
- tanilama 9y agoBecause it is not great at solving real world problem.
- ultim8k 9y agoHistory has shown that sophisticated and more superior technologies are almost never the winning ones. Instead, technologies that prevail are often the ones that are more accessible to a broader audience of developers and the ones that manage to evolve faster in order to engage with the latest trends without breaking backwards compatibility. The same philosophy applies when trying to find a solution to an engineering problem. Good solution is rarely the super-well-optimised and super-efficient solution that applies all the best patterns written in the sacred books. Good solution is the one that solves the problem quickly and at the minimum short-term and long-term cost including development, running and maintenance.
- wink 9y agoDepends on where you put your grading of superior. Maybe Haskell is the end-all-be-all for some criteria, but it certainly isn't for others. So one could say it's not superior for all the use cases where these criteria don't match. I'd agree more with your points if I'd see more of a unique picture of people saying "Haskell is the superior programming language" and of course you see a lot of converts that say this, but it's a very vocal minority. This ends in a tautology with the broad masses still unconvinced. Also a lot of them concede that it's not practical for everyone for everyday use.
- danidiaz 9y agoIn his talk about "milestones in the development of lazy, strongly typed, polymorphic, higher order, purely functional languages" David Turner mentions that the wan't adverse to SASL (https://youtu.be/QVwm9jlBTik?t=1819 https://youtu.be/QVwm9jlBTik?t=1819) and Miranda (https://youtu.be/QVwm9jlBTik?t=2330 https://youtu.be/QVwm9jlBTik?t=2330) —both predecessors of Haskell—to be used in industry. Getting out of the ivory tower was not a last minute idea, it seems.
- theoh 9y agoThe Peter Landin paper "On the Mechanical Evaluation of Expressions" (https://www.cs.cmu.edu/~crary/819-f09/Landin64.pdf https://www.cs.cmu.edu/~crary/819-f09/Landin64.pdf) makes it totally clear that, for Landin, FP was an alternative to the bookkeeping required in systems programming. Since he stands at the beginning of the tradition that led, via Turner's work, to Haskell, I think it's not a huge leap of the imagination to attribute Haskell's lack of success, as a language for building systems, to this inherited attitude that the programming system should be elegant, principled and mathematically structured. No concessions are made to the practical needs of someone writing, for example, an operating system, except to the extent that they provide an occasion for a new theoretical construct. (Lenses are a recent example of this.) And take implicit data structures, for example. I know Edward Kmett has explored this idea in Haskell, but really, it's a totally alien concept for the FP philosophy. Just as traditional operating systems tend to require a little bit of assembly code in addition to C, the purist FP system that wants to manipulate genuine implicit data structures will need to call on some outside language with the power to manipulate them... That seems like an intentional state of affairs.
- 2sk21 9y agoSounds like another rediscovery of "Worse is better" https://en.wikipedia.org/wiki/Worse_is_better https://en.wikipedia.org/wiki/Worse_is_better
- discreteevent 9y agoThe article makes a good point. When you get to the edge of any system it behaves like a stateful object. So the only way to get rid of 'objects' completely is to extend your system to cover the whole world. I doubt the author thinks he can do this, but even what he describes sounds ambitious. Another way to look at it is that it's good to learn FP and apply it where it makes sense but don't neglect your object modeling skills (where object = something that exibhits behaviour in response to messages)
- elihu 9y agoBesides the reason given in the article (most everyday applications have a large surface area where they interact with a larger system, and that system is largely imperative and untyped), I think that network effects are a big problem. If you want to create some new application in Haskell, you'll probably need some collaborators. If all your potential collaborators know Haskell that's great, but the chances are a lot higher that most of them know Javascript or Python or Java. So, that's often what you end up using if the main goal is just to solve some immediate problem with the least hassle. Another factor is that most of the high-profile projects people are familiar with (linux, gcc, firefox, llvm, inkscape, etc..) are fairly old projects. Haskell has also been around for quite a while, but it's really only in the last decade or so that it's become a pleasant language to use. That's both because of libraries and tooling, and also because it took a long time for the Haskell community to go from "we don't know how to do IO in this language" to "we have this IO monad thing, but we don't really know how to use it" to "this is a language we know how to write applications in and lots of people have done it." At the time that many projects got started, Haskell either didn't exist or hadn't progressed to the point where every little thing wasn't blazing a trail into the unknown.
- sheepmullet 9y agoSimple: The productivity boost is not worth the time investment. Which will give developers a better return on productivity? 200 hours spent learning Haskell or 200 hours spent learning more about the business domain they work in? 200 hours spent learning Haskell or 200 hours spent improving their soft skills? 200 hours spent learning Haskell or 200 hours spent networking? Etc.
- spronkey 9y agoIndeed. Though, will 200 hours spent learning Haskell gain you, well, anything productive? Surely a non-genius would require at least 1000.
- Veedrac 9y ago> I would not be surprised if Haskell were 100x better than Java for writing compilers. The author sounds like someone who has glimpsed at the truth, but is only willing to take miniscule baby-steps away from their mistaken position. Think about what it means to say Haskell is 100x better than Java for writing compilers. If you really believe this, quit your job and spend a year writing a Graal competitor in Haskell. You'd own the market for Java, Python, Ruby, Perl. You'd have built your own LLVM JIT. Literally every week you spend in Haskell is two man years of Java programming! Of course this is nonsense. There is perhaps a 10x difference between Haskell and x86 assembly. I'd doubt it, but it's at least plausible. But compared to C? If Haskell really was some blessing from the gods, you'd actually know of more than a handful of random compilers written in Haskell. Like what actually is there, GHC and Elm? How is that a shining array of successes? To stick to your guns and say, well, abstract composability is super important but maybe it breaks down around IO, is just not supported by anything approaching evidence. Yes, C++ causes LLVM issues, but writing LLVM isn't hard because of C++! The difficulty of a problem is not total_difficulty / language_expressiveness. It doesn't matter a damn how expressive your implementation language is when every step forward is a research project. There's a dangerous mythology in programming that we can fix all the complexities of programming by piling on ever more contrived tooling. All I've seen this lead to is an inability to remember that you're actually programming to solve problems. Maybe you solve all the really easy problems with a different choice of language, but the really easy programs don't matter. To end with a Torvalds quote on Rust, but that applies just as well here, > To anyone who wants to build their own kernel from scratch, I can just wish them luck. It's a huge project, and I don't think you actually solve any of the really hard kernel problems with your choice of programming language. The big problems tend to be about hardware support (all those drivers, all the odd details about different platforms, all the subtleties in memory management and resource accounting), and anybody who thinks that the choice of language simplifies those things a lot is likely to be very disappointed.
- deleted 9y ago[deleted]
- mixedCase 9y ago>all the subtleties in memory management and resource accounting), and anybody who thinks that the choice of language simplifies those things a lot is likely to be very disappointed Those are exactly two of the things that Rust and many languages with complex type systems tackle and very successfully help out with: Instead of having to get it right every time and having to pay special attention in the edge cases, you define it well and then let the compiler help you catch misuses.
- xamuel 9y agoLet's look at an audience where Haskell (or FP in general) ought to be popular, if any of the hype is true: mathematicians and logicians writing pseudo-code in research papers. What we see is that pseudocode is almost always imperative. Sometimes it even uses GOTO!
- anonlastname 9y agoHaskell is not a toy, but it's not a general purpose workhorse either. Part of the appeal is that it is independent of the practical side of things. It allows you to write theoretically interesting programs.
- agocorona 9y agoThere is already a kind of unison for Haskell: https://github.com/transient-haskell/transient https://github.com/transient-haskell/transient
- tuvok 9y agoAs a mathematician who works with category theory, Haskell is a piece of cake. Much simpler than java, python, ruby, etc. It just requires a kind of thinking that is not tought to computer scientistis or on any programming courses. I recommend the book Category Theory (Steve Awodey ,2006).
- sras-me 9y ago>>Writing CRUD apps? Haskell isn’t as much of a win. If you are dealing with databases, having typed results from data base queries, and ability to define tables with custom typed columns (Opaleye library) can provide quite a lot of type safety.... That is just one example. If you are good with type level programming, it is possible that you will be able to find a way to encode the in variants of your business domain into the types and have the compiler assist you in building correct programs...
- ken 9y agoThe first 3/4 of this article reminded me of Zed Shaw's "The Web Will Die When OOP Dies" (though for some reason I remembered that title as the converse). It doesn't look like unison.cloud is aiming to replace the web as an end-user application platform, though. What would a pure functional platform look like? More like Datomic, I think, and maybe then I wouldn't run into 404s so much.
- harry8 9y agoWhen the ratio of "introduction to monad tutorial blogposts" to useful applications gets somewhere below 1,000 perhaps Haskell can be considered as more useful in performing data transforms than it is entertaining the programmer. Given the number of people who have learned the language there is really not much written in haskell that is used for something that isn't programming a computer.
- tabtab 9y agoI have to say that I have yet to see significance practical problems that functional programming solves better than procedural or OOP. I've had debates over this many times, and almost every example is a case of a bad framework and/or a bad language (such as Java's "stiff" OOP model). FP is a language band-aid, not a solution. There may be a few edge cases, but why complicate the 99% for the 1%? I'd be happy to debate more scenarios. Bring it on!
- erpellan 9y agoFP is not new. OO is not new. They are tools in the toolkit. Take an object with a bunch of instance methods. They are all equivalent to functions with a hidden first parameter. If you make 'this' explicit you've got pure functions. It's not magic. Intellij even has an automated refactoring for it in kotlin. You can take a function and convert it to an extension method and back again: fun String.foo(a: Int) vs fun foo(self: String, a: Int) The real fun of FP is building simple functions that operate on a single value and then stringing them together, generalising to lists of values, filtering etc. MapReduce is functional programming. At epic scale. It's name is literally a portmanteau of two of the most fundamental higher order functions. FP rocks.
- dragonwriter 9y ago> Take an object with a bunch of instance methods. They are all equivalent to functions with a hidden first parameter. If you make 'this' explicit you've got pure functions. Well, you’ve got normal imperative procedures that maybe return a value. Pure functions mean something else.
- tabtab 9y agoThe domain and use-case is not clear to me here. I want to know what real-world task is to be performed, not how to convert one language to another language.