Ask HN: If you were starting from scratch again, what language would you learn first?

3 points by vaksel ↗ HN
5-6 years ago, if you were just getting started, you only had a couple of choices, now there are dozens of choices. If you were starting from scratch again which language would you pick up first?

12 comments

[ 4.7 ms ] story [ 30.8 ms ] thread
I'd still choose Java as my bread and butter language.
Scheme, because of this book:

http://mitpress.mit.edu/sicp/

Why argue with the MIT folks?

Followed immediately by: C, Javascript, and a scripting language (Ruby or Python are good choices).

You've also got to work Java in there somewhere, just so you know where people are coming from. It could come first, or last, depending on your tastes.

If you love Windows technologies you can probably substitute C# for one of those things. Maybe even for several of them. I have never seen .NET but I hear good things about it from those who have.

If you can't stand SICP, or can't follow it (perhaps because you are seven years old?) then the initial choice is harder. Javascript is sitting on your desk right now, so it's an obvious possibility. Try Ruby or Python. Or just give in and learn PHP like everybody else seems to do. You'll run into problems, but you can fix them later.

I tried this. It hurt...I don't want to go into detail, but it hurt.
Why argue with the MIT folks? Because even MIT changed its intro programming class's language from Scheme to Python.

That said, I would still have liked to learn Scheme or a Lisp as a first language. It's a tiny language at its foundations and allows you to express many different computer science concepts with little effort. Also, it's much, much easier to write a Scheme interpreter in Scheme than a Python interpreter in Python.

Python! Instead they tried to teach me pascal! A language that simultaneously sucks and isn't used that much! Good thing I forgot it all after I stopped learning it. Well, okay, maybe it didn't suck, I can't remember, but I tend to forget bad memories, so it probably did.

Then again, technically I didn't learn that much pascal anyway, so I don't really count it as my first language(and there was logo before it, but I learned even less of it).

5-6 years ago there were only a "couple of choices" compared to "dozens" now?

Nearly all of today's practical languages were around 5 - 6 years ago.. Perl, Python, C, C++, Java, Ruby, JavaScript, etc. Of the major languages only C# wasn't particularly well developed at that point (and Ruby lacked a good usage case at the time).

I doubt many here will chose a language that's come along in the last 5 years (Io, Clojure, Scala).. though I'd like to be surprised :)

Assembly language.

I firmly believe that people will never use high-level languages well until/unless they understand how those high-level languages translate into machine code.

I started with assembly, moved to C, dabbled in C++ and some of the microsoft solutions (c#, VB), then moved to ruby for web stuff...

Cant say I would want to learn in a different order, but I do wish I would have moved out of my assembly language stage faster...

Python. I actually wanted to learn it in earnest around 2001-02, but never really pushed myself.

Given that I'm now attempting to make it my primary language, especially since django came out, I would love to have had 6-7 years of experience behind me.

Python, then LISP and (SML or Ocaml), then C and assembly and compilers, then Python again.

Though I like what Norvig said in http://norvig.com/21-days.html

"Use your friends [...] Keep it simple. [...] Play. [...] Given these criteria, my recommendations for a first programming language would be Python or Scheme. But your circumstances may vary, and there are other good choices. If your age is a single-digit, you might prefer Alice or Squeak (older learners might also enjoy these). The important thing is that you choose and get started."