9 ms·
I think there are really two types of programming languages, "idea" languages and "practical" languages. "Idea" languages take a concept and try to build almos
by overgard 3y ago
I think there are really two types of programming languages, "idea" languages and "practical" languages.
"Idea" languages take a concept and try to build almost everything out of it. So like, lisp with lambdas, or smalltalk with message passing, or prolog with logic statements, etc.
Then there are "practical" languages, which don't necessarily have a "core" idea; more likely they're defined by the domains they're useful in and have a grab bag of ideas. So like C++, typescript, etc.
I think "idea" languages have their appeal because they seem elegant, and as coders, we often try to take a novel idea as far as we can. Usually, that ends up being too far. Like, if you're building a React app, and you go overboard, maybe everything becomes a reactive component even when expressing things in that way can be awkward and your component isn't really a ui "component". Or if you're writing in a functional language, all the sudden loops become recursion and you're praying that it has tail call optimization. If you're writing java, maybe you see dependency injection everywhere. I think we just have this urge to see how many nails our shiny hammer can hit, even to the point of diminishing returns.
Anyway, I guess all I'm saying is that even if you can express something as turtles all the way down, you might not necessarily want to build your house out of turtles.
- rr808 3y agoThe Bjarne Stroustrup division is very similar: "There are only two kinds of languages: the ones people complain about and the ones nobody uses"
- agalunar 3y agoI've never really liked that quote. It's just a way of saying that nothing's perfect, and of course nothing is perfect, but that doesn't mean you shouldn't try to improve them. The quote has always struck me as defensive in a way that stops discussion. It's okay (in fact, more than okay) to say that a complaint is founded on an unsound premise or that a proposed change is a bad idea, but calling other languages useless or unwanted (or implying something to that effect) in response to criticisms of C++ is a bit of deflection, as if saying "well, at least people are productive in it", and I don't think particularly constructive. I think you can start a constructive comment this way, though: "despite its problems, people are still productive in C++ and I think x, y and z are reasons why, so x, y, and z ought to be kept, &c". And in some other context, I think this observation is meaningful: all the languages that are commonly used are complained about, so a complaint about C++ does not necessarily imply that it's worse than any other commonly used language.
- agalunar 3y agoah, to be clear, I'm not saying I disliked the parent comment by rr808! I was just tangentially ruminating on the quotation.
- tialaramex 3y agoYeah, it maybe works as a snappy comeback but there is no deeper insight here. Is it possible to make a language that more people use and yet there are fewer complaints? Of course.
- deterministic 3y ago> but that doesn't mean you shouldn't try to improve them Nobody suggests you shouldn’t. Stroustrup has spent most of his career working on improving C++. You are reading way more into his comment than I think was intended or implied. C++ is one of the most successful programming languages in history. There is a reason why.
- agalunar 3y ago> You are reading way more into his comment than I think was intended or implied. You're likely correct (I'm unable to find the original context of the comment), but it's rarely employed with its original context. Indeed, I was more trying to say that I disliked the quotation itself (and how it can be used) than whatever Stroustrup meant by it. > C++ is one of the most successful programming languages in history. There is a reason why. And I said as much in my comment. (I would also point out that some of the reasons may not be good reasons. But some certainly are!) > Stroustrup has spent much of his career working to improve C++. To improve the current situation, we may want to abandon C++ altogether for new programs rather than stubbornly hold on to it. (In the back of my mind is Stroustrup's recent reaction to the NSA report on memory safety.) I'm under no illusion that programmers will begin formally proving properties of their programs, as interested as I am in that. But people seem to rarely avail themselves of the tools that help them write correct C++, and rarely manage to use only modern C++, which suggests we may want to simply let go of it. Or radically change it – making safety features opt-out rather than opt-in.
- mlazos 3y agoI don’t remember where I saw this - but ofc there’s haskell, which is both!
- pulse7 3y agoSo Java must be heavily used...
- pluijzer 3y agoyes it is. Outside of the startup culture it is everywhere.
- gherkinnn 3y agoOf course it is. I pass on a lot of jobs for just that reason.
- bmacho 3y agohttps://en.wikipedia.org/wiki/TIOBE_index#/media/File:Tiobeindex.png https://en.wikipedia.org/wiki/TIOBE_index#/media/File:Tiobei...
- deterministic 3y agoJava is one of the most successful programming languages ever created. So yep.
- benterix 3y agoWell, it's telling it's a quote by Stroustrup, not van Rossum.
- nikanj 3y agoThere was a decent xkcd comic about this in 2007 https://xkcd.com/224/ https://xkcd.com/224/ Essentially all of our biggest software systems are made with php, c++, java etc. Elegance and beauty somehow always lose to the hack-together-itude of other languages
- namaria 3y agoI think the "Worse is Better" essay captures it well https://www.dreamsongs.com/RiseOfWorseIsBetter.html https://www.dreamsongs.com/RiseOfWorseIsBetter.html Platonic ideals are great for thinking clearly. Doing things in the messy reality often requires compromising. It's impossible to solve all corner cases a priori...
- k__ 3y agoReact got pretty far with it's turtles.
- sampo 3y ago> I think there are really two types of programming languages, "idea" languages and "practical" languages. Idea languages invent features (first order functions, closures, garbage collection, algebraic types, structural patterns matching, type inference, ...) and 10-20 years later these start to appear in practical languages, too.
- overgard 3y agoNo doubt, idea languages are where the innovation happens and they're very important in that regard.
- igouy 3y ago> smalltalk with message passing And then we look at language implementation and find message passing can be optimized away — The control structures that are so optimized by the compiler are the conditional selection messages to Booleans (ifTrue:, ifFalse:, and ifTrue:ifFalse:), some of the logical operation messages to Booleans (and" and or:), and the conditional repetition messages to blocks (whileTrue: and whileFalse:). page 550 https://rmod-files.lille.inria.fr/FreeBooks/BlueBook/Bluebook.pdf https://rmod-files.lille.inria.fr/FreeBooks/BlueBook/Blueboo...