

How to Pick a Language - jimbokun
http://web.mac.com/jimbokun/iWeb/Site/Blog/AB35C167-7755-4113-938C-968F65256D76.html

======
bayareaguy
_Pick Arc if: You want a 100 year language and you’re willing to wait that
long._

I know it was a cheap shot but I couldn't help but laugh when I got to that
point in the article. The relative lack of activity on
<http://arclanguage.org/forum> makes me think the best reason to choose Arc at
this point is to run news.arc.

~~~
giles_bowkett
I'm doing a presentation today where I say that Arc is a failure and I always
feel guilty about that. But the thing is, I think the real reason for the fail
is in the book "Art and Fear." If you focus on quality, you end up with
inferior quality compared to people who focus on quantity. You have a much
better chance of creating a 100-year language if you create a 100 languages in
a year.

Remember, Lisp is at least a 50-year language, and Lisp was originally created
as a joke or a teaching example or something. The great bearded wonder, the
one that Lisp guys make shirts of, Schultz or McCarthy or whatever his name
was, only wrote up the spec to make a point, some kind of math thing iirc, and
somebody egged him on and they ended up implementing it. But it wasn't that he
just had this magic ability to build a great language. He made a thousand
other snarky points in his life, and this one just happened to be so well
phrased, mathematically, that it trumps all other languages, in the opinion of
many people. That's not a one-time stroke of luck in the language design
department; it's the results of decades honing his craft as a master of snark.

~~~
zupatol
_If you focus on quality, you end up with inferior quality compared to people
who focus on quantity_

That sounds a bit simple. What about that other great bearded wonder,
Leonardo? He only made about 30 paintings.

[http://en.wikipedia.org/wiki/List_of_paintings_by_Leonardo_d...](http://en.wikipedia.org/wiki/List_of_paintings_by_Leonardo_da_Vinci)

------
acangiano
It's opinionated, but this article serves as a good FAQ for people who might
be asking what language should they learn.

~~~
gaius
Well, no because there is one factor that dwarfs all others: what are my
friends or the people in my field using? If everyone you know (personally or
professionally) is using language X then there will be collective experience
you can tap, documentation, mailing lists and howtos, lots of code already
written, etc. It doesn't matter if you have a "better" language if there's no-
one you can talk to or whose code you can reuse.

Remember, a programming language is not a technology. It's a community. Choose
the community you want to join, then use what they use.

~~~
axod
"Remember, a programming language is not a technology. It's a community.
Choose the community you want to join, then use what they use."

I can't disagree with this enough. Why do you need to talk to people? Why do
you need to reuse other peoples code? Perhaps for some people, the community
matters, but I don't think that's common.

Obviously you need to have decent language documentation, but that's not a
community, it's just the specs.

~~~
gaius
Maybe you are at the point now that you can implement any application in any
language without ever running into problems, writing every library routine you
ever need from scratch, porting the compiler/runtime to a new platform if you
need to, and you also have complete mastery over your application area, say
aeronautical engineering or bioinformatics, able to solve any problem in code
without ever speaking to another living soul.

If so, my hat is off to you my friend. But that's not me, after 15 years as a
professional and two degrees, and I'll wager that's not anyone else reading
this either. In my experience, the community around a language trumps all
other factors for _getting stuff done_.

~~~
axod
The point is this:

If you run into issues, you need to be able to solve them. If the language is
well documented, you can use that. If there are tons of books on the language,
you can pick up a book.

I'd say asking the community is usually a last resort. Ever asked the PHP or
Javascript community questions? Most of them have no idea. They'll give you
terrible, often incorrect answers. Ever asked the Java community? Most will
recommend you use XML to create a FactoryFactoryGenerator pattern on Jetty
using enterprise beans. Ask the lisp community? They'll burn your house down
for assuming you're worthy of asking them a question.

Obviously these are generalizations, and I'm sure there are some great
javascript,php,java,lisp etc communities around.

Choosing the language based on the community amounts to just following the
other sheep, rather than taking an unbiased decision about which language best
fits the job required based on factors including libraries available, books,
maintainability, ease of hiring people in later etc etc

Also I'd say communities like this (Hacker news) are far more valuable than
specific language communities.

~~~
gaius
"Community" includes turning to the person at the next desk and saying, hey,
have you seen this before? Or asking on a mailing list inside your
organization. That's why I said "people you know personally or
professionally".

~~~
axod
Sure, but I'd value a good general hackers opinion over a specific language
specialist.

~~~
gaius
It really depends on your application domain. Someone knowing that the complex
thing I want to do is already in NumPy and she used it herself yesterday and
here's a snippet of code pasted into my IM is priceless. Similarly I might
say, oh, I wrote some code that does nearly your thing, you could just change
this one line. Pretty much anything I need I could code up myself in a half a
day or a day, but all those half days add up.

More than one project I've started in Lisp here (not to pick on Lisp, just as
an example) and run into an issue that I _could_ implement myself in time T or
do the whole lot in Python in time T/10. It's a no-brainer. For non-trivial
tasks to be completed within fixed periods, striking out on your own with a
new language is a meaningless risk.

------
kleevr
Maybe this should be a separate 'Ask HN', but...

Previously over the last 6 years I've coded in PERL, PHP, JAVA, and C#.

I'm currently 'retraining' myself over to Python for scripting and web
programming (django).

I plan to stick with Java and C# for the time (our shop is about 50/50 split
over SOA boundaries). And I want to keep fresh in these as my bread winner
languages until I get out on my own. (Not to mention with the advent of
Jython/IronPython, and Clojure it might not be bad to really dig some heels
into the JVM/CLR idea.)

BUT, after I finishing working through AIAMA in Python. I want to get to work
on picking up a lisp dialect and work through SICP. So I was curious, what
would be a better angle of attack: Scheme, CL, or Clojure. I'm drawn to the
idea of Scheme as it's been painted as a simple language to explore 'deep CS'
concepts. But, Clojure sticks with the JVM/CLR strategry.

Would I be missing out if I didn't start with CL? (it sounds like the Latin of
programming languages)

Are Lisp dialects (at least those mentioned above) more similar than
different; or, How difficult is it to switch dialects?

Is Clojure _specifically_ a bad choice for working through SICP?

~~~
GeoJawDguJin
Clojure is what you'll want to be using if you ever start doing "real
programming" in a useful, expressive Lisp. Don't start with it, though.

In the following order:

    
    
        1) Learn Scheme and get through SICP. Wind up with
           enough of an appreciation of Scheme that you could
           write real programs in it, given enough patience.
        2) Attempt to learn Common Lisp.
        3) Become frustrated and give up on Common Lisp.
        4) Learn Clojure instead, and become overjoyed at the
           real work you can get done.
    

I'm mostly joking about steps 2 and 3. They're based on my own experience with
CL (and Elisp) and might not apply to you. Going from Scheme to Clojure will
be a bit of a shock, though, because the former is absolutely as sparse as
possible with lexical punctuation, and the latter is totally littered with it
(particularly stuff that's borrowed from Perl and Ruby). If you've written
enough Perl, though, you might not care.

By the way: Scheme is Latin, and CL is Ancient Greek. ;)

------
henning
Here's an alternative set of instructions for comparison:

1\. Write down all the garbage-collected languages you've heard of (from Java
to Erlang to whatever) on index cards, one language a card

2\. Pin all of them up on a nearby wall

3\. Throw a few darts at the cards blindfolded and look at what languages the
darts landed on or near

4\. Pick one of those and write assloads of maintainable, bug-free code in it.

------
nihilocrat
Hate to be another person to chime in with "What about language X?", but I
feel Lua fits decently well in the Javascript category. I would say these are
true "scripting" languages, because they are intentionally built for scripting
the behavior of an application, and they both have very minimal
implementations that support the prototype model for objects.

------
miked
>> It is a functional straightjacket like Haskell and Erlang (no side-
effects), appealing to functional programmers.

Not so. Clojure has three different mechanisms for judicious use of side-
effects, including Software Transactional Memory. But yes, side-effects must
be quite explicit.

------
jballanc
Nice and thorough. I only have two qualms:

1\. Reading through the Matz book on Ruby
(<http://oreilly.com/catalog/9780596516178/index.html>), there's a very good
explanation as to why Ruby/Python/Perl are "scripting" languages as opposed to
"programming" languages: no main! That is, whichever file is fed to the
interpreter is run (with some exceptions) in order. So these are, and probably
always will be, scripting languages.

2\. The author vastly underestimates the importance of Javascript...

~~~
jimbokun
Interesting way to define "scripting" languages.

I didn't mean to underestimate JavaScript, which is why I gave it its own
section. Perhaps I was too brief? Implication that its only useful in the
browser?

~~~
alecco
Love it or hate it, Javascript:

* Is the language having the most important performance gains lately.

* Growing support from both corporate (Yahoo, Apple, Google) and free software (Mozilla) camps.

* Gains market with HTML 5 (just the canvas element alone makes a huge difference for JS based software.)

* Better frameworks for both UI and client-server software.

It's funny how things turn.

~~~
catch23
Yeah, it's strange how only 2 years ago or so, both ruby and javascript scored
rock bottom on Alioth Shootout, with javascript scoring 4 times slower than
ruby, and ruby 3 times slower than python. Two years later and there's 7
interpreters for ruby and 4 for javascript.

~~~
silentbicycle
There's something to be said for trying to make an expressive language and
worrying about how to make it efficient later. Only working with stuff you
_know_ you can do efficiently can lead to getting stuck in local maxima.

------
zenocon
The article is pretty light. I don't think it necessarily does any harm, but I
think the article kind of misses the mark if you are someone that is really
faced with this issue.

I would argue that picking the language also depends very much on the
domain/platform/target you are writing software for. Is it a web application?
Is it a desktop GUI app? Is it an RIA -- for web or desktop? Is it a
scientific application that needs great math libraries? What are the
performance characteristics? Does it need cross-platform support? Is it a
distributed business enterprise system? Is it an embedded system? Is it a
library? Do you want the library to be able to be used by many different
platforms and languages? Does it have to integrate with other systems and what
languages are those written in? What about 5 years down the road -- how do you
think it will evolve?

Most likely -- answering the question on what the domain/platform/target will
be will trim you to a very short-list of options. For example, if you are
programming for an embedded system, you may have to use C because that's the
only language you'll find compiler support for. Maybe there will be a C++
compiler -- but whether or not you choose it can depend on a lot of factors
such as whether your team is comfortable with C++/OO...whether you even want
to utilize OO...whether you can afford the additional memory/complexity
associated with the features of C++...etc.

------
tremendo
A well reasoned and presented series of arguments in pro (mostly) of many
language options.

However it is a bit confusing to me who the intended audience is. The decision
criteria--choose this language if...--seem a little beyond what a novice or
would-be programmer can answer with certainty ("Pick Perl if: ...your mind
fits the mind of Perl."). For someone looking to expand his/her programming
repertoire, perhaps a goal-oriented approach would also be useful? (systems,
Web, mobile, desktop programming, etc.) And a seasoned hacker probably won't
be in need of this help.

I enjoyed reading it, but then, I'm not at the moment trying to decide what
language to pick.

------
akkartik
Pick ruby if: you want to program on the web.

I prefer python as a language, but rails has two things no other web-framework
has, IMHO - A culture of TDD (<http://news.ycombinator.com/item?id=445627>),
and the easiest way to do simple AJAX out of the box with rjs
([http://api.rubyonrails.org/classes/ActionView/Helpers/Protot...](http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper/JavaScriptGenerator/GeneratorMethods.html))
Just not worrying about string escaping is huge.

~~~
mshafrir
The first link points to a comment about being productive while riding
Caltrain...

~~~
akkartik
Hmm, I should just restate my point rather than try to repurpose it from
elsewhere.

TDD has enabled me to work in far smaller chunks than before. The ripples of
this one fact are transformational, and so I place more emphasis on unit-test
support than most aspects of a language/tool.
<http://www.reddit.com/r/programming/comments/6sktz/a/c04r6i5>

There.

------
zmimon
A pretty nice survey and well balanced post - nice!

My only gripe - it missed out on my favorite - Groovy - which is my favorite
because it combines the best features of most of the others.

~~~
gaius
There's some enthusiasm for Groovy here, tho' we've not (yet) done any
production work with it. I guess my main fear is that it's a dead-end like
Cold Fusion, I don't feel it really has a critical mass behind it. What sort
of work are people doing with it?

~~~
zmimon
There's a lot happening with it ... I think it's main advantage is that it
completely seamlessly integrates with java and inherits it's basic syntax from
there, so anyone familiar with java or with existing stuff in java (and that's
a lot of people) can get a flying start. Groovy on Grails is where the main
action is - it's basically a rails clone, but built on a standard java stack
so if you need it you can always peel back the covers and access it.

I too initially thought of it as a dead end - why choose a language that
_only_ runs on the JVM when you can choose a language that runs natively as
well? But once I started using it I really liked it, and the integration with
java is really superb (much more seamless than Jython, JRuby etc.). So it kind
of stuck. (I use Django as well, but not as much).

------
twopoint718
I get the "what language should I learn" question pretty often. I think I'll
point the asker to this article. Thanks for a very broad and easy-to-digest
overview.

------
sireat
Fun and relatively comprehensive list, but where is Prolog? Admittedly it is
not often practical, but when it is, it make some problem-domains so much
easier to grasp.

~~~
scott_s
Have you ever used Prolog for a practical problem? (This is a sincere
question.)

------
l0stman
How about Smalltalk?

------
gsmaverick
PHP?

~~~
jimbokun
I don't know PHP, so didn't comment on it. Would it get its own category, or
fit into one of the ones I gave?

~~~
maxwell
I'd put PHP in a category with JavaScript, since they resemble p/py/r but were
designed for web programming rather than scripting.

~~~
catch23
I guess that sort of works... but php is still serverside. Anyone doing web
dev must learn javascript, but not necessarily php. Javascript would probably
be competing with actionscript or any other client-side plugin stuff.

------
orionlogic
i wonder why no one mentions Processing as a learning programming language.
Its fun and quite capable of doing interesting things. more info at
<http://processing.org>

~~~
twopoint718
Maybe another good "Ask HN" topic would be: "How would I 'bridge the gap' from
programming computers to programming other physical devices?"

Wiring certainly looks like a cool language that goes in that direction.

------
time_management
ML deserves mention here. It's not quite a functional strait-jacket, and was a
source of many Haskell ideas, e.g. pattern matching.

Oddly enough, I tend to think of Ocaml as a "functional C". You can do low-
level imperative stuff with it, if you wish, but you usually end up
abstracting the unimportant details out and going functional quickly.

~~~
niels
ML was the first language I ever learned. I didn't appreciate how cool it was
back then though. The pattern matching concept makes for some really elegant
code. It replaces a lot of control structure code.

