I think this is an excellent point, @jaror!
This talk may also be interesting to some of you
Thatâs just cute advertising.
What counts in the end are the interactions. When I started fresh in Haskell, I was mostly roaming the #haskell IRC channel and while there wasnât a âthe world is a happy placeâ vibe, it was an extremely resourceful and supportive place back then and I believe is still today.
I do not think I would have stuck around for that long if it wasnât for the people in that channel.
On the other hand: contributing to hackage libraries and other major projects left me with a bag of mixed feelings. Iâve come across quite a few maintainers who are not willing to collaborate (and they are not obliged to!), but here I wish we could incentivize collaborative attitude somehow.
My best bet would be something like Maintainership standards ¡ Issue #7 ¡ haskellfoundation/stability ¡ GitHub
Just my 2 cents as a software professional: make it easy and prescriptive like elm did.
Or like the role that spring and quarkus take in the java ecosystem: they tell you exactly how to write a common bread-and-butter REST to db application.
Intermediate Haskell is a wasteland. It needs more todo list and petstore applications
I totally agree. I donât think Haskell stands a chance against Rust with what Rust does best (it is better to go the Python way and interface with those fast languages). But why even bother with that competition? Easily half of the internet is written in PHP, Python and Java. I just donât see how Haskell could not compete with those.
I agree with @dhouthoo. PHP has Laravel, Java has Spring, Python has Django. Itâs not like there are not millions of libraries there that do the same thing, itâs just that there are well-packaged plug-and-play frameworks with decisions already made that are solid enough to cover your typical use case. I thought Yesod was meant to be like that, but nobody talks about it, and I donât know it much.
On the bright side, I think writing web apps in Haskell, today, is somewhat solvable. Iâm preparing a little demo, but since this topic popped up, I promise Iâll stop procrastinating on it and finish it soonish. Since I brought this up, a little teaser wonât hurt.
I think this is being addressed from the wrong perspective. Multiple languages are as niche as Haskell and most of the ones mentioned in this thread (ex. Elm, Gleam) are even more niche, so I would not use them as reference on what to do to âbreak outâ.
If we think about this âissueâ from the other side, what would be a good reason to pick Haskell for a commercial project?
So, why would I pick Haskell instead of any of these languages mentioned above? If you want to increase the adoption of Haskell you need to find a good use case where it becomes the âmost reasonableâ option. Personally, I think that itâs a great fit for internal network apps, surpassing Go which is the current popular choice.
For this use case, Haskell provides great - if not the best - tools:
Now, I donât think itâs âbadâ to focus in tooling, general documentation or introductory material, but it seems to me that the main use case of Haskell is very specialized types of apps which are just not massive, so these measures just donât have the impact that you would wish for.
I think the ârightâ path forward is focusing on the strengths of the language and its ecosystem rather than trying to widen the range of use cases.
I concur. We should not trying to be others. There are a lot of things Haskell is for, where other languages are not even close. Trying to bridge the gaps with the mainstream use cases isa good exercise but probably not a goal to win mainstream adoptions.
And both statements are accurate. Haskell is (together with C++ and Common Lisp and maybe some others) just about the most unfriendly language there is.
Important to note is that this has nothing to do with the friendliness of the community at all (as an outsider I perceive Elm as âfriendlyâ, but not its community), but the language and at least its build tools, most importantly the compiler. What does being a âfriendly languageâ mean? Look at Elm, which aims to be a âfriendly Haskellâ (if you allow ;). While I havenât used any of them, Elm, Gleam and Roc (not be be confused with the âlanguageâ formally known as Coq) strive to be âfriendly languagesâ, here is Rocâs (quite detailed) explanation what it means by being a âfriendly languageâ: Friendly | Roc
Besides having a friendly community, Roc also prioritizes being a user-friendly language. This impacts the syntax, semantics, and tools Roc ships with.
This is what I have a problem with.
We as a community donât have a way to explicitly âfocusâ on a use case direction. Volunteers work on whatever they want.
Companies may use it for anything and pioneer a use case everyone thought of as niche.
Haskell is a general purpose language. I donât really think about Julia or Kotlin when I start a new Haskell project.
Both extending solid pre-existing use cases and pioneering new use cases may grow the community and the industrial adoption.
What we can agree on as a (disorganized) community however are more the boundary conditions, so to speak.
Whatever you use Haskell for, you will be exposed to:
Now, when itâs about the case where Haskell is lacking in a particular use case (say, cryptography, which is a real problem), then we need ways to empower people who do want to bring about change.
Thatâs as much about funding as it is about community processes. And I think weâre not doing too bad.
Letâs change that then. Iâve been spending a lot of effort in trying to improve error messages, which seems to be a big part of what makes a language friendly. We have collected problematic messages and discussed possible improvements. There is also the error message index which has seen a lot of contributions from many people. Please do join this effort!
P.S. I forgot to mention @tomjaguarpawâs GitHub - tomjaguarpaw/tilapia: Improving all Haskell's programmer interfaces, which is also a great effort to make Haskell friendlier.
i donât think that is possible or desirable, haskell has a ton of inherent complexity/difficulty for instance would you give up purity and do notation for the simpler/easier imperative sequencing?
the fact is in haskell you cannot claim to understand hello world without some level of understanding of monads.
we know why we accept this tradeoff but all such choices impose a friendliness penalty.
in my opinion the right way to go about expanding the user base would be to see why you already like haskell and see in which ways you can reduce friction so that a prospective haskell user also can use haskell the same way.
bonus point: you would be way more likely to be willing to contribute that.
Iâve heard this claim from outside the Haskell community, and now from inside. I donât understand it. What part of understanding this requires an understanding of monads?
main = putStrLn "Hello world"
I agree with this. Thatâs why I started Tilapia, that @jaror already linked.
ok, you are right, if no sequencing or bind happens then you donât need to understand monads. but this doesnât invalidate the point, any simple program will directly or indirectly use (>>=) or reinplement or use the equivalent fmap + join. The thing is doing haskell without monads would be incredibly painful, so they increase the inherent difficulty of haskell.
My initial thought about friendliness of a programming language was that it was mainly driven by error messages. Iâve also been convinced that good documentation and tooling are important parts of friendliness. Language design can also have impact on friendliness, but I donât think it is the most important factor. So, I think we can get pretty far without compromising on the language (or introducing breaking changes).
Well, hereâs a program that implicitly uses (>>=)
:
main = do
putStrLn "What is your name?"
line <- getLine
putStrLn ("Hello " ++ line)
And hereâs the equivalent in Python.
def main():
print("What is your name?")
line = raw_input()
print("Hello " + line)
Theyâre almost identical. Since no understanding of monads was required to understand the Python version, I donât see how understanding of monads can be required to understand the Haskell version.
One might say âbut to understand do notation you have to understand monadsâ. I donât think so! Just look at the do notation. Itâs works exactly the same way that the Python equivalent works, as far as a new user is concerned.
[This is a bit tangential, so if we keep discussing this particular issue maybe we should fork off a new thread.]
Iâm doing a Twitter straw poll: https://x.com/tomjaguarpaw/status/1917230178431906276
No one has yet mentioned teaching in this thread. Are you opening a new line of discussion, or are you making a point related to @eldrich-cookieâs original claim in some way? If the latter, please explain in more detail what.
I think that â<-â is going unnoticed for Haskellers. The fact there is a difference between âlet a =â and â<-â will very quickly become relevant. And it wonât be easy to explain without the fundamental concepts.
Personally, I donât always get the urge of always wanting to dumb things down. But perhaps Haskell is a bit too âhighâ comparing to most of the languages. So , maybe.
Ah, well, fair enough. But I was really just interested, in this case, of investigating the narrow claim that you must âunderstand monadsâ to understand âhello worldâ (or simple Haskell programs). It doesnât seem true to me, for the definition of âunderstandâ that I use, at least.
To answer your explicit question, I have five or six hardware design/electronics engineering type folks using a Haskell EDSL for writing programs for our Groq LPU. I doubt they would say they âunderstand monadsâ. In fact I doubt they even know theyâre âusing monadsâ. (They barely even know theyâre using Haskell.) For them, the point of learning Haskell (or for me, teaching them some amount of Haskell) without understanding monads is so that they can write programs for the LPU. It seems to work well!
First I should repstate that I havenât used any of the âfriendlyâ languages, and my interpretation of friendly is mainly this quote from Roc:
Rocâs syntax isnât trivial, but there also isnât much of it to learn. Itâs designed to be uncluttered and unambiguous. A goal is that you can normally look at a piece of code and quickly get an accurate mental model of what it means, without having to think through several layers of indirection.
I cannot say anything substantial, just that in my experience not having âmonads and type classesâ at all is a fine solution too, at least it was in F# (which does have some kind of do notation equivalent) and that Elm looks fine to me. What is worse is something in the middle, like Rust does. So type classes without actually working higher kinded types. This is really frustrating, being so close to being good.
Good error messages make an language friendlier, but not friendly. Rust is an unfriendly language (less than C++ and Haskell, but I guess it will catch up to them) with âfriendlyâ tooling and error messages. So Rust is somewhere in the middle, between âfriendlyâ and âunfriendlyâ, Iâd say. So at most Haskell can get âneutralâ, like Rust
Iâd say it is the most important factor. The existence of compiler extensions is already enough make Haskell âunfriendlyâ. And the (over-) use of infix symbols. And the general abstraction level. And the existence of Template Haskell. And âŚ
Of course there are many people who would argue that Elmâs âHaskell-likeâ or Rocâs syntax are unfriendly too, because theyâre not âC-likeâ.
Shouldnât we double down where we excel? What can the world gain from having another Web application framework in a rather non-mainstream language? If I may answer the original question for you, âI grew the number by SIX!â
Sure, but why limit programming in Haskell to people who do more than modifying an existing thing? I suspect thatâs how programming works in many languages for many developers.
Probably yes, about the same they could do in Python, which theyâre not familiar with either.
Well, this seems like begging the question âHaskell users have to understand monads, because if they donât theyâre not really Haskell usersâ.
I donât follow. I wasnât talking about a web application framework. Iâm not sure if you thought I was.
I donât really follow this either. Do you mean by âoriginal questionâ, âHow to grow the (commercial) Haskell user base?â. Groq is certainly successfully using Haskell commercially.