|
Lets look at PHP a little bit. It made moving from a static site of just html files to a slightly dynamic site dead simple, just rename the file .php, and add in a few <php? blocks. And then it was deployable with just ftp, which helped because some hosts didn't give ssh, and many people wouldn't have know how to use ssh at first.
That's why it "won" on the server side, at least for small sites. It solved the problem of "I don't know much about web programming, but I have a website and I want it to do a bit more" really, really well.
It doesn't matter if it lacked higher level features to them. So it didn't have them. So experienced programmers, who knew how to get cgi scripts running and could make a website using a "real" language look down on it, since it doesn't add value to them, and, frankly, it does suck a bit. Tons of gotchas, but they couldn't fix them once it became popular so fast. It'd be a much better language if it had time to mature before becoming popular. That's actually a similar story to Javascript, since it really didn't have any time to mature before shipping out to everyone. But I think both languages have improved as they've been upgraded. But make no mistake, we could have built them better if we started over now, and didn't have to worry about backwards compatibility. We have learned which parts we'd want to keep and which parts might require some ironing out. Now, for the longest time, Haskell had a unofficial motto of "avoiding success at all costs"[1], (page 10). "When you become too well known, or too widely used and too successful suddenly you can’t change anything anymore. " So, it's not a big surprise that Haskell isn't super popular, since the creators don't really benefit from it being super popular, and it makes their research harder. [1]: http://www.computerworld.com.au/article/261007/a-z_programmi... Do check out this article, it's great if you want to learn about languages.
The whole site is.
Page three talks about how languages pop out of nowhere: "In my experience, languages almost always come out of the blue." Let me look at a few new languages Go:
It works great for concurrency, and shuns the hierarchies of OO for interfaces, but keeps the nice syntax. It feels a lot like Python even with it's static types. It's lack of proper generics cause it to get looked down upon sometimes by PL folks, and it's GC make it unpalatable for C/C++ tasks. I'm sure it's useful for Google. C++11:
It feels like a different language from C++. A lot of the verbosity of doing things the idiomatic way falls off (`for(const auto& x : things) {}` is much better than the old way). It definitely makes the language better, and can help speed it up and make it safer too. Rust:
It actually feels a bit like C++: The Good Parts, plus all the concurrency goodness from Go, and the little things you hate going without from Haskell (Algebraic Data Types is a big one). It's pretty ambitious, but if they can pull it off, I think it'll one of the best languages. I'll pick Rust to beak down your question about how I think it's better.
It's "better" than C++, because it leaves out all the foot shooting and messiness, and has just the good parts. And it's nice to have Option types without pulling in Boost.
Compared to Ruby, well, it's aimed somewhere different, but I think it's faster while being at least close in expressively. Ditto for Python.
Lisp, well, again, it's aimed differently, but Rust does have macros and strong functional programming support. Personally, I'd take the type system and leave Lisp behind.
Java? Well, apart from not running on the JVM and being more complicated, I think you can say more clearer and have it run faster in Rust.
Smalltalk? I don't know if Rust is better, I haven't used smalltalk at all.
Erlang? This one is actually somewhat comparable, since both have strong functional programming support, and good concurrency. I think you can actually do more in Erlang, with it's actors approach, and it certainly wins with the hot code swapping and really cool features there. And Erlang also has better bit level logic support. But those features are exactly what are needed for Erlang's niche, so I'm not sure if I'm being fair. I can't say if one is better than the other here. Swift:
Wow, this one is new. But, it does take some of the things I really like, such as Algebraic Data Types (it's enums), along with things that you really expect from a modern language these days, such as tuples, lambdas/closures, map, filter, and generics (I'm looking at you Go!). It also inherits a bit from Objective-C, and I think that's at least partly why it is it's own language, and not some other language with some libraries. Also that playground feature seems like it's pretty neat; it's what Bret Victor was talking about. Does my rambling help in any way? PS: Haskell isn't the pinnacle, it's just a gateway to Idris :D |