6 ms·
There's probably some truth to this. My mathy friends have a deep appreciation of Haskell. I always try to get into it for a few weeks, marvel at it, grok some
by aaron-lebo 9y ago
There's probably some truth to this. My mathy friends have a deep appreciation of Haskell. I always try to get into it for a few weeks, marvel at it, grok some new things, then inevitably end up in more "practical" languages (only because there are almost no domains, save parsers and compilers, where Haskell is obviously the "best" fit).
This may describe why: Haskell it built for the sake of itself, it's coherence, it's design. It is first and foremost designed to do things the Haskell way, which may be conceptually pure and "right" but aren't necessarily the most straightforward. In contrast, most other languages exist to solve a problem C++ (performance and control), PHP (a templating language for the web), Python (web, data science), JS (browser), etc. This being my understanding/paraphrasing of what the author is saying.
I think the answer is somewhere in the middle: the good parts of Haskell, selected for pragmatism (strict instead lazy like most languages), with an emphasis on being approachable to users. There's a lot of languages that are almost there. Elm gets the ease of use but strips too many features. OCaml is practical but has std lib split, multicore issues, and is kind of crufty. Go is arguably too simple, Rust is too low-level, Kotlin is almost there but the JVM can't replace languages that can produce straight binaries for the most part. Nim is very easy to write in a functional style and is maybe the most practical language I've ever used. It lacks the support, libraries, and mindshare of the others, though.
What kind of worries me is there is a strong incentive for languages to promulgate themselves into domains they aren't especially suited for, so it's more likely that one of these flawed languages will be Frankensteined into a domain it doesn't really belong and we'll be hacking around those disadvantages in a couple decades. Maybe the real answer is to take a step back and consider what is a middle ground that gets 90-95% of what anybody needs. I'm not convinced that something like Nim or a new language couldn't be 99%, with the 1% of the time being necessary to drop into domain specific languages. If one of the big corps put support and funding into the "right" language, it's not really a difficult job, but it is those damn incentives. How do you fix them?
- kobeya 9y agoActually the same could be said about Python and the Python way, pythonic programs, etc.
- aaron-lebo 9y agoThe thing about the Python way is it is dogmatic but it is also very practical: it's dogmatic about being practical. For loops and list comprehensions are more familiar or easily explainable to many programmers, so Guido kind of hid map/filter/reduce instead of leaning on them or having alternatives like other languages (Cloure or JS). I've got friends who I'm not sure can read that are able to understand Python. Haskell isn't like that.
- kobeya 9y agoHaskell aims for simplicity. That is favoring the reader/maintainer of code over the writer. It’s a different trade off that is not obviously worse.
- aaron-lebo 9y agoI don't really consider Haskell an example of simplicity, I consider something like Elm or Go simple. Haskell is...correct? But this is a problem with these discussions because my definition is different than yours and they could both be argued to be correct. Is this like Hickey's easy vs simple? Is my definition incorrect?
- kobeya 9y agoI meant it in the objective sense of information theoretic complexity. I’m not sure what other measurements would be objective in comparison.
- aaron-lebo 9y agoIs there any research which shows that Haskell is superior in terms of information theoretic complexity.? I'm not familiar with the term. The only thing I can find it in reference to Haskell is this: https://en.wikibooks.org/wiki/Haskell/Algorithm_complexity https://en.wikibooks.org/wiki/Haskell/Algorithm_complexity which isn't really related to this: That is favoring the reader/maintainer of code over the writer. What material is there which shows that Haskell is simple in terms of information theoretic complexity and superior to other languages (not?) designed for that?
- dmitriid 9y ago> Maybe the real answer is to take a step back and consider what is a middle ground that gets 90-95% of what anybody needs. I call this "pragmaticaly typed language", but should just call it "a pragmatic language"
- hellofunk 9y agoRegarding other languages out there, I'm gradually starting to appreciate what has been accomplished with Swift. I did not like it at first, and the new version 4 of the language is much improved over the first a few years ago. But the algebraic data types that are pervasive in the language, and the versatile and type-checked pattern matching, and the familiar functional toolset with first class functions, map, filter, etc, and the widespread use of value types over object references, there are a lot of things there that come from other languages, and most importantly, it's a highly practical language for getting real work done on billions of devices. I'd like to see Swift adopted elsewhere other than just Linux and Apple platforms, as I think it has a lot to offer, some great compromises.
- firethief 9y agoMiddle ground. Compromise. You're looking at language diversity with the assumption that it's a problem. No corp, no matter how powerful, could make the be-all-end-all language because a language isn't a tool; it's the culture around the tool. Imagine you have three teams of hackers, each composed of die-hard devotees of a language: C++, Rust, and PHP. You task each team with building a program to the same spec, in C++. You already know what to expect, don't you? The PHP bunch will finish first, with a program that works probably well enough. The Rust gang will make something frighteningly safe, that doesn't use any memory. 10 years later the C++ folks are still writing clever templates. Different languages are good at different things not just because of the strengths and weaknesses of the language itself, but because a language has an associated worldview, and different worldviews lend themselves to different goals. Within hackerdom there are many communities adapted to different ideological ecosystems. In a future with one "perfect" language, where would you go when safety was the only thing that mattered? You'd have to find some old geezer who cut her teeth on Ada, before the Programming Cultural Revolution.
- zzzcpan 9y agoCould you give a few examples of good parts about Haskell and why do you believe they are good for anybody?
- aaron-lebo 9y agoI think Haskell's view of the world with types is basically right. Pattern matching, algebraic datatypes, typeclasses, powerful and usable functions, and immutability (by default) are a great way of reasoning about code. Add the other common aspects of functional programming (map) and you have a very lean and expressive core. Haskell also has a lot of really cool and crazy stuff related to parallelism/concurrency, which are at least partially possible/easy because of aspects like immutability (Erlang/Elixir show this, too). http://chimera.labs.oreilly.com/books/1230000000929/index.html http://chimera.labs.oreilly.com/books/1230000000929/index.ht... To be honest I'm extrapolating a bit; my experience in static typing is mostly in other languages and my experience with functional programming is mostly in Elixir/Clojure, but a mix of the two in my book is the most bang for the buck you'll find. But as a disclaimer, ....I'm acting like I know what I'm talking about, these are just my feelings from working with some of these languages off and on. Haskellers can answer this much better than me.