4 ms·
I don't think simplicity is as much of a recipe for language popularity as you claim. Scheme is a very simple language, far simpler than any of the languages yo
by pcwalton 14y ago
I don't think simplicity is as much of a recipe for language popularity as you claim. Scheme is a very simple language, far simpler than any of the languages you mentioned, yet it doesn't get much use in industry. Standard ML is a simple language, simple enough to be formally specified even. Most computer science students easily pick it up and learn it as part of a compilers course, so it's not that the language is simple in theory but hard to grasp. Lua is a wonderfully simple language, and it's found a good niche in games and configuration, yet it's nowhere near the popularity of its older, more complex sibling JavaScript.
On the other hand, C++ is probably the most complex language on the planet and it's hugely popular. PHP is an incredibly complex language—it surprises almost everyone who uses it—and it's extremely popular as well.
Language simplicity is just one of many factors influencing a language's success.
- camus 14y agoPHP C and C++ are popular because they are imperative languages. For non mathematicians , "imperativism" is far more easier to grasp than functional , closures , first order, monads , ... it is easy to understand what a IF statement does , what a FOR loop is , and a basic PROCEDURE or FUNCTION is. It is not easy at all to think in terms of pure functions , immutability , etc ... because you need to actually design you code before writting it. I dont think Haskell is hard because of the syntax , it is hard because it is a functional language.
- pcwalton 14y agoNone of the languages I listed feature purity, immutability, or monads. (Granted, Scheme and Standard ML do express a clear preference for immutability, but you can mutate all you want.) And closures are hardly an uncommon feature at this point, I'd say. Even C++ and PHP have them.
- tikhonj 14y agoYou say that, but it doesn't match my experience at all. I've taught high-schoolers basic Java and they had all sorts of problems with for-loops and procedures. In fact, it took me a while just to describe what a (mutable) variable was! To many of them, the idea of changing value was not intuitive at all. It didn't help that Java coopted well-known syntax from high-school algebra like x = 10 to mean something completely different. At my university, everyone started with a Scheme course followed by a Java course. The Scheme course starts out functionally, but never mentions it. People didn't have too many problems there except with recursion, and most of them got that after a couple of lessons. The Java course? Not so easy! People did have problems with if statements (why is it a statement and not an expression?). They also had problems with figuring out what was a reference in Java and what was passed by value. A lot of problems with that particular facet, in fact. In fact, the people without any programming experience before college had more problems with Java than with Scheme, despite the fact that the Java course was second. Basically, you're projecting your years of experience with imperative programming onto what you imagine a beginner thinks like. I do not think this is particularly accurate--it certainly doesn't match what I've seen in practice. For people with literally no programming experience, functional programming is not less natural at all. If anything, it makes more sense, because it fits with the minimal mathematical background everyone has.
- camus 14y agoI began programming with Caml. I found TurboPascal much easier to use. So definetly began with functional programming.