News for hackers. Stuff that matters.
Re:Elm from a Business Perspective by dkarapetyan on Wednesday November 09, 2016 @05:00PM (#12915137)
The academics always miss this part. They assume the most elegant and concise form of expression for an idea or a concept is equivalent to pragmatism. When in reality pragmatism in software engineering is mostly about making things obvious enough at a cheap enough price point. This is why golang is so popular even though all the academics on r/programming hate it.
Re:Elm from a Business Perspective by chrisdone on Wednesday November 09, 2016 @07:23PM (#12916399)
There are many points to respond to here.

1. Evan (the Elm author) has pledged to support type-classes, it's on the issue tracker, and because he believes that they are useful.

2. "The academics" is a mischaracterization. I use Haskell and PureScript professionally and share the same problem of the "Elm is Wrong" author, which is that it's impossible to do any generic programming.

3. Generic programming is important for something as simple as inserting my own data types as keys into a dictionary. So is being able to write "show x" and just have the thing showed if it has the instance of a showable class. Or to parse a nested data structure of various types from JSON.

4. Being able to use my own types as keys in a dictionary is pretty pragmatic, I think. A typical pattern in ML-style languages is to wrap types like Int in a UserId type that just wraps it and protects it from being mistakenly used with other Ints. Now try to make a dictionary of users via the UserId type. Nope.

5. "They" in this case aren't concerned with elegance or concision for the sake of it, but because the features under discussion help them do their job better, avoid mistakes, reduce maintenance cost, and that's good for business.

6. Go has non-academic, purely pragmatic problems that are orthogonal to its popularity, as does PHP or nodejs.

None of the things under discussion are difficult to implement, novel or exotic. Given that other languages like PureScript exist under the same domain and from the same family of languages, we have the luxury of holding other languages up to the same standard. In this particular point, Elm is a -1.

Re:Elm from a Business Perspective by dkarapetyan on Wednesday November 09, 2016 @07:33PM (#12916478)
And yet plenty of programmers somehow manage to ship perfectly good solutions to everyday problems without "generic programming" capabilities as you define them. The author of "Elm is Wrong" might have good intentions but the tone of that post is so condescending and inflammatory that all the points being made are lost. The title alone already starts everything on the wrong foot.

Instead of sitting on such a high horse the more constructive approach is to outline the shortcomings, implement the solution, and contribute it upstream. That's not what I see though. Most of these "critical" posts end up just being that. Comparing a language that programmers use every day to ship working solutions to another one that has considerably smaller mindshare and community and then calling the more popular solution a failure because it doesn't have the feature from the more "pure and elegant" language. There is clearly a disconnect in tone and intent across all such posts.

I don't have any horses in these races. Programming languages are just tools and the religious zealotry around them does not appeal to me.

Re:Elm from a Business Perspective by kritzcreek on Wednesday November 09, 2016 @08:04PM (#12916694)
I don't think you get to call people condescending when you just generalised "the academics" to be ignorant of the "real world".

> Instead of sitting on such a high horse the more constructive approach is to outline the shortcomings, implement the solution, and contribute it upstream. That's not what I see though.

That's what the "Elm is wrong" post did though. It outlined the shortcomings and showed how it was impossible to implement the solution because of somewhat arbitrary limitations to the extensible record system. The tone was way off and made it an unpleasant read, but valid points were made.

Re:Elm from a Business Perspective by dkarapetyan on Wednesday November 09, 2016 @08:11PM (#12916734)
> I don't think you get to call people condescending when you just generalised "the academics" to be ignorant of the "real world".

Those are your words, not mine. My comparison wasn't about ignorance but of a different value system that is consistently substituted in discussions about programming languages and the substitution is then swept under the rug. The substitution being as I said theoretical concision and expression vs more easily understandable boilerplate and pragmatism.

Re:Elm from a Business Perspective by pka on Thursday November 10, 2016 @12:13AM (#12917927)
> And yet plenty of programmers somehow manage to ship perfectly good solutions to everyday problems without "generic programming" capabilities as you define them.

This is definitely true. The firmware on your phone is probably written in assembler.

> Instead of sitting on such a high horse the more constructive approach is to outline the shortcomings, implement the solution, and contribute it upstream.

You complain about sitting on high horses while the author did exactly that and got a high-horse response from Evan.

> Comparing a language that programmers use every day to ship working solutions to another one that has considerably smaller mindshare and community

Are you talking about PureScript? Judging by GitHub popularity I'd say both languages are about equal in that regard, but who knows.

Re:Elm from a Business Perspective by dkarapetyan on Thursday November 10, 2016 @12:16AM (#12917937)
> Are you talking about PureScript? Judging by GitHub popularity I'd say both languages are about equal in that regard, but who knows.

I'm not talking about any language in particular. Just a generic observation about the pattern I've noticed across language communities. I'd much rather see less inflammatory rhetoric and more awesome stuff being made in whatever language people enjoy using so that the rest of us can see the technical design decisions and trade-offs involved. As I said in another comment programming languages are tools, they're not religions, so we should stop treating every little shortcoming as an affront to the one true way to write code and ship software.

Re: doing the right thing. I don't think he did. He didn't even bother looking into why the decision was made to take out a certain feature. He just assumed the decision was wrong because it made a certain design pattern he likes hard to emulate.

As I'm writing this I think I've spent too much time on explaining why the quality and approach of posts like "Elm is Wrong" is not the proper way to approach language design discourse. I'm sure it feels good to a certain segment of the population to point things out this way but to the rest of the community, especially other programmers that just do programming as a job all this drama seems quite childish and I think it again goes back to the point about programming languages being tools. When put in the proper context the drama is amateurish.

Re:Elm from a Business Perspective by pka on Thursday November 10, 2016 @12:52AM (#12918076)
I agree the blog post wasn't professional, but there was none of that tone where it mattered, the Github issue.

I can see where his frustration stems from though, getting a response like "I don't want to unless you show me a use case" when clearly presented with a use case after spending weeks trying out someone's language can be infuriating. As I said, not very professional, but understandable imo.

Re:Elm from a Business Perspective by sotojuan on Wednesday November 09, 2016 @05:19PM (#12915297)
This is interesting because Elm has been removing features that Evan considers "too hard" and confusing for the average developer. I'd argue it's not "academic" any more (though it might be interesting for an academic who wants to do UI).
Re:Elm from a Business Perspective by dkarapetyan on Wednesday November 09, 2016 @06:24PM (#12915918)
Yes, that is my point. I don't think Elm is "too academic". I think it strives for pragmatism in real world engineering scenarios and that is why it gets flak from a certain segment of the programming community. Similar to how golang does.
Re:Elm from a Business Perspective by busterarm on Wednesday November 09, 2016 @07:49PM (#12916585)
Is it truly because they are "too hard" or is it because their current implementation in the language falls short? I was pretty sure in at least one of the cases Evan mentioned the possibility of revisiting it later.

Other languages don't make these choices and end up with things like Python's async/await.

Re:Elm from a Business Perspective by vvanders on Wednesday November 09, 2016 @05:06PM (#12915175)
Yup, and that's been one of Evan's core principals in Elm, pull out the good stuff from academia but in a way that's accessible to the lay-developer.
Re:Elm from a Business Perspective by projektfu on Wednesday November 09, 2016 @06:07PM (#12915760)
I agree, sometimes you just compound the cleverness too much. There's lots of software that could be written in J in about 150 characters that might take much more in other languages. But I can come back to a line of J and wonder, "what was I doing there?" for a long time. Similarly, I have to stay current in Haskell for it to continue making sense. If I put it down for a few months, I come back and have to re-learn a lot of concepts each time, especially to understand other people's libraries as they adopt the next cool thing.
Re:Elm from a Business Perspective by rifung on Wednesday November 09, 2016 @06:11PM (#12915787)
> They assume the most elegant and concise form of expression for an idea or a concept is equivalent to pragmatism.

Alternatively, perhaps many academics don't care about pragmatism and appreciate elegance and conciseness for their beauty. Admittedly I might be projecting, but part of the reason I have considered getting a PhD is to stop having to concern myself with the interests of the industry and money.

Re:Elm from a Business Perspective by dkarapetyan on Wednesday November 09, 2016 @07:31PM (#12916455)
That's not what I've observed. The discussions actually turn out to be quite inflammatory when these matters are involved. Even folks that claim to have PhDs in language design consistently confuse these concepts. That's the only way I can explain all the condescending remarks when it comes to things like type systems, monads, curry-howard correspondence, etc. In fact the above article is a response to one such inflammatory and condescending blog post by a programmer who clearly values theoretical beauty and specific patterns that typeclasses enable above software engineering pragmatism. Although I can see how typeclasses help in cutting down boilerplate in this case his tone does not help make that point.

I'm no stranger to abstract and theoretical beauty. My undergrad and grad training is in pure math but I also understand that theorems and proofs don't necessarily lead to good software engineering in the large. So valuing the abstractions is great and all but using it as the ultimate arbiter of good language design is not.