To me, this list is great except for one small thing.
- C
- Prolog
- Erlang
- Smalltalk
- Javascript
- Hakell / ML /OCaml
- LISP/Scheme/Clojure
Javascript?! Over Ruby or Python or Lua? What is it with people liking Javascript. I really don't get it. What can I do that is so beautiful or mindbending that I can't do in python?
From my experience there is only two reasons to learn Javascript: to be able to build web applications, or to write document store queries (MongoDB or Riak, although in Riak you can also use Erlang). Otherwise I just don't see what the big deal is.
Argh. How could you read this post and still miss the point so badly?
It is not about languages, it is about ideas. And the fact that you need years to master each of these languages because of ideas they are built upon, not because of such trivial things as syntax.
I strongly suspect that Joe would be equally comfortable with this list was C substituted with Go, Smalltalk substituted with Io or JavaScript substituted with Lua.
To paraphrase: "what is it with people liking or not liking JavaScript"? I know what is it with these people: they are noobs (sorry in advance, this is not intended as offensive). I have been programming for just twenty years now and I just recently, a few years ago, understood all this, so I'm not exactly surprised by your post, but still, I thought that email so well written as Joe's here would repel this kind of "Javascript is bad, use WhatEver(tm)" talk.
> What is it with people liking Javascript. I really don't get it. What can I do that is so beautiful or mindbending that I can't do in python?
That's kind of a silly question to ask.
For one, features are duplicated across masses of languages. If you ask, 'what is the one specific thing I can do in this language that I couldn't do in some other language?', the answer is almost certainly nothing. Languages only really start standing out from one another when you start talking about combinations of features. Javascript's combination of prototyping, closures, and first class functions isn't like any of the other languages on the list even before you get to html DOM manipulation or nosql.
But the more important point I'd like to make is, that if a whole bunch of smart people say they really like something, and you can't see why, that should be a sign to look harder.
Which is not to say, if a whole bunch of smart people like something you have to like it, too. But there's a reason smart people recommend it. And even if you eventually end up disagreeing with the reason, that doesn't mean it isn't there.
What is it with people liking a specific language in general? Didn't you read the whole post?
"Today there is an unhealthy concentration on language and efficiency and NOT on how things fit together and protocols - teach protocols and not languages."
Exactly. Forget the language. Use it if it works for what you need to do. Learn to program correctly, learn how things fit together, how you can use languages together and for the right purpose; learn the fundamentals, learn algorithms, and you'll build quality software in whatever language you choose.
> What is it with people liking a specific language
What is it with shaming people for preferring a specific language where it is applicable?
For some reason I can like a brand of electric drill, and I can believe in using a nailgun, but I am not allowed to like a specific language without someone coming along to scold me.
If you don't ever develop opinions about tools and how to use them, are you really engaged or are you just floating along? Liking something is a good sign of engagement, being able to compare it to others in an informed way is even better. The problem is if you put other things down without knowing about them.
What is it with people missing the point so many times in a row? Hence why I said "learn how you can use languages together and for the right purpose"—but I don't believe it should be the primary focus.
When you buy a drill, the main purpose is to make holes in things. When you buy a nailgun, the main purpose is to stick things together. One might do it better, one might do it faster, and yes, it's useful to know those things. But you're still building a house, not an opinion about a drill or a nailgun.
Ever notice how professionals treat their tools, versus amateurs? Photographers are a great example. Amateur photographers are all about cameras and lenses and tools. They buy gear like there was no tomorrow, and they do very little actual photography. Some of them make it past this phase and change their focus to what photography is really about (light, subject, timing) but most don't.
Professional photographers buy cameras for one purpose: because they get the shot. They buy lenses for one purpose: because they get the shot. And they buy everything else they need for one purpose: because it gets the shot. Their focus is the photograph and everything else follows. Of course there is some thought of what lens is right for what job, and what camera works best for what needs, and durability and portability especially; but mostly they use what works because they know it well and it gets the shot. And some pros use the most ridiculous gear that you'd never expect because it works so well for their particular goals.
There was an article a while back about a Iraq war journalist who used only Olympus 6MP zoom cameras made 5-6 years ago because they were workhorses, extremely portable, and held up to desert conditions. Non-pros probably thought he was crazy and dumb, but he got the shots. He shipped. You have seen his photos in the news, guaranteed. Talking about that gear out of context, it would make zero sense. But for the situation, it was perfect, because he focused on the task and not the gear.
I'm not scolding anyone, I'm not criticizing a choice of language; I'm saying, focus on the right part of your task. The tool is important, but the task is more important. That's exactly what the original article was saying, too, if you'll kindly go back and take note.
Beautiful comparison with photography and well said. And I would like to know the answer to this one: "What is it with people missing the point so many times in a row?" too. It's not like it's hard to understand or that there are few explanations out there.
I suspect many things and have many theories, but I'd be happy if someone concisely summarized different possible causes of such a behaviour of amateur programmers (and/or photographers). My "they're just noobs" doesn't cut it, because it may well be a description of effect and not the cause (I suspect it is).
Oh I understand it well, I think. I went through phases such as this in both photography and other fields. I sort of skipped it in programming thanks to a theoretical CS education, and being told constantly "the language doesn't matter" throughout my learning phase.
I think you're always striving for higher quality at the beginning. You always want to skip over the developing mastery part right into mastery, but it never works that way. So you take shortcuts, and you see that they have effects. To continue with the photography example, if you buy a more expensive lens, for a while it looks like your photographs are getting better. On the surface, they improve. They're smoother, sharper, with better color; whatever. For a while, you think that's what photography is all about, the quality of the image, the lust for higher and higher quality.
We do the same thing in programming. You learn a language. It lets you do stuff. But then you learn a different language and it just seems so much better in the areas you believe are important right then. On the surface, it's easier to code in and easier to understand and it results in more polished code, or faster, or it lets you do things in a way that seems cool. You think "why would anyone ever use Old Language when they could use New Language?" You build lots of cool things and no one uses them but they're cool anyway.
In both fields, the beginner is just learning their tools. It's important to go through that phase in photography, because you learn that lenses and cameras and flashes and gear really do make the result different. The mistake is thinking they make the result better. Because better has many different meanings that are deeper than the surface level that the gear can affect. Same with programming: you make this mistake that New Language is better because it does XYZ better, without realizing that what you're actually building has a deeper meaning than just what the language does better. That it actually takes a lot of different languages, or that Old Language might actually be a better choice because you don't need XYZ, you need ABC. Or something.
It's the difference between mastery and the illusion of mastery or the desire for mastery, and it's the process of learning what tools are for and why they're important, before realizing that they're only important on the surface: as a means to an end. It's an attempt for quality before mastery, which has a limit.
Once you have mastery though, if you've got all the other parts right, then chances are you're going to choose the right language. Language isn't unimportant because it's not important (it is); it's unimportant because if you have everything else right, then the choice of language follows naturally. It's not a concern. It's an afterthought that a true master will already have the answer for.
This is why if you go up to a professional photographer and ask them what kind of camera and lens they're using, they'll just give you a quizzical look and roll their eyes. In their head, the answer is obvious. "The right one."
Will they still be attached to their gear? Of course. Will they still prefer what they're used to? Of course. But they have no illusion that it means anything more than that.
In the end, the photographer in the right place at the right time with the right light still wins, regardless of the gear—even though he still has the right gear. And in the end, the programmer with the right project and the right customers with the right need still wins, regardless of the language—even though that programmer has probably already chosen the right language.
I really love the comparison to photography. It's good to remember that no one tool is perfect for every job and that new doesn't mean better.
That said, it's also good to remember that there's nothing wrong with loving your languages as long as you reasonably avoid bias and don't let it stop you from trying new languages and ideas.
JavaScript is the best-to-learn (both most currently used and arguably best developed) member of the Self-style prototype-based OO languages. Thus, for a breadth-oriented education in programming concepts that helps you understand the available tools, where you've already learned Smalltalk and C, it has a lot more distinct to offer than Ruby or Python. This is independent of whether it is a better language that Ruby or Python or Lua for general industrial use (which, in practice, tends to end up being an issue more driven by the availability, accessibility, and level of support for libraries for currently-important tasks rather than intrinsic features of the language itself.)
Javascript is a very different language from Python. It is in some ways more flexible and less prescriptive. You point out one of the non-overlapping use cases. Javascript performance has seen really intensive efforts. Javascript has grown a rather nice async ecosystem that Python just doesn't have. It's also exciting for people from the standpoint that everything feels newer and more up for grabs. Python is a rather old language.
Any language is Turing complete so the big deal is a matter of style and tools and libraries and ultimately it's who you are working with and what you want to do.
Javascript's async story is far worse than Python's.
Yes and no. Python may have an great async core with Twisted and gevents, but it doesn't have an great async ecosystem. Most tools and libraries aren't written with async in mind and you end up having to roll your own in many places where Node either gives it to you out of the box or with well supported third-party libraries. After having written quite a bit of Twisted code I have to say I find writing async code in Node a lot quicker and easier, despite being a much more experienced python programmer.
Then try gevent. The monkeypatching they do means that most pure Python network code just works with it. For instance, I used the XML-RPC library that ships with the core with no further modifications beyond what gevent does.
It's less good than using a language with first-class support for continuation-style programming, but it's better than using a language that makes you be the compiler and chop up and manage the event handlers yourself.
"Javascript has grown a rather nice async ecosystem that Python just doesn't have. It's also exciting for people from the standpoint that everything feels newer and more up for grabs. Python is a rather old language."
Python old? Not to be snarky, but I've got programs for the PDP-11 that dated Python's great-grandmother. Excitement in a language doesn't cut it, I respect productivity, environment and progress. For automation, data munging and analysis, Python is my secret weapon in a shop of MS SQL Server DBA's and C# ditto heads. Would have be nice if MS would have adapted IronPython instead of creating PowerShell...
Yes, there are oodles of crappy Turning complete programming languages, but there's definative advantages to a much smaller sub-set of decent langauges and environments.
Python is, objectively, decades old. For some people that would make it less exciting. Excitement produces buzz and popularity and encourages development effort which creates real and useful code.
I vastly, vastly prefer Python. But we are NOT helping Python AT ALL if we bring it up to trash Javascript every time it's mentioned, without making any argument more specific than "I used a PDP-11".
I'm not seeing a decrease in Python development and investment. In the past decade I've seen a lot of effort invested in interesting and productive third party utilities and libraries. New languages still have to build those tools and such to get to a steady-state and attract more than language explorers and hipsters.
I wasn't trashing Javascript, which is obvious if you trace through the message thread. I haven't delved much into modern Javascript, since most of my work involves data and cli/desktop/network applications instead of web applications and services, so I don't have a valid observation worth sharing.
Python hit its stride a long time ago. The Javascript ecosystem has only quite recently reached sufficient performance, usability and adoption to be a serious general purpose language and it's red hot as a job skill. Python is not dead, but it's not exactly blowing up at this point.
Depends on what domain you work in. If I used nodejs or web services, then I would be enamored of Javascript. But I do an data analysis and ETL, a domain that Python and friends excel at, I not concerned as what's "hot" and "in" at the coffeshop.
As others said you missed the point. But, you also (based on this one comment) have little awareness or imagination.
> What can I do that is so beautiful or mindbending that I can't do in python?
The most (and plainly) obvious is; write programs that run on the widest deployed platform/distribution network by several orders of magnitude. That is mindbending and beautiful. Go use Javascript for several years to figure out the rest.
Javascript has some unique concepts, while Ruby or Pyton are just mix of features also present in Smalltalk or LISP. So learning Ruby has no added value if you already know those.
> learning Ruby has no added value if you already know those.
Maybe learning it just as a learning exercise is not so valuable, but Ruby is fantastically useful at getting shit done in the real world with a language that's pretty good. For instance, try and do this in standard Erlang:
stdout_str, stderr_str, status = Open3.capture3(command)
You can't. I've been complaining about it since 2004, others have sent patches, and you still can't easily handle stderr and stdout as separate streams with open_port.
Python also borrowed some good stuff from Icon. Not that many folks here have actually used Icon, but it was fun to compile and play with back in the day.
I know it's wrong, but I've used pliers on bicycle wheel nuts. They were at hand and the Park wrench wasn't. But what the hell, the tire was flat and it was a long walk home.I am a kludgaholic. And not seeing it as a problem.
The author was using Fortran on punch cards and considered himself lucky [Enter: three more Yorkshiremen ...]
I started on Punch cards... Back in '86 we had a Bulgarian over at Bristol and he told us that in Bulgaria you only got one compile so if you wanted to change your programme you had to edit the object deck (ie assembler in punch cards).
I remember a Saturday making punch cards. I was probably five. He must have had an assignment due. He was back in grad school and still working full time. He's got stories about manually editing paper tape.
AFAIU Python's closure have been incomplete for a long time. I think they've become true, complete closures after the addition of the nonlocal keyword on 3.0
Please correct me if I'm mistaken. This all comes from a cursory research on the subject.
To my eyes they always were true and complete, but you had to play the minor trick of using mutable data to get them. Here is an example of what I mean that has worked forever.
I think I heard that this wasn't working around 2.0 or earlier... but I'm not curious enough to go research and I wasn't using Python until 2.4. Can you maybe confirm or deny this?
In short, in your opinion, Python has no "complete" closures because you cannot bind a new value to the name from enclosing lexical scope from within a nested scope. I disagree.
Which is why I disagree with claims that Python doesn't support them either. It does, of course; we could argue if Python supports "complete" closures, but we won't, because we know better than to use meaningless terms in discussion, right?
In any case it's not been the case in a while, so I stand corrected.
Although being able to write on the closed over variable is a neat feature to have, I would argue that feature does make a difference. Whether you call that complete or read-write or however you want to.
From my experience there is only two reasons to learn Javascript: to be able to build web applications, or to write document store queries (MongoDB or Riak, although in Riak you can also use Erlang). Otherwise I just don't see what the big deal is.