Live data from Hacker News

Is it better to learn JavaScript or Python as a first language?

news.ycombinator.com

1–10 of 13 posts

Re: Is it better to learn JavaScript or Python as a first language?

#2
JavaScript will be more friendly to you, and will open the doors to more applied languages, including Python.

If you learn Python first, you might have trouble learning other languages.

Ideally, in the end it wont matter - a programmer can program in any language, but for starters I would say start with JavaScript.

Re: Is it better to learn JavaScript or Python as a first language?

#7
In general, python is a more "regular" language with less unusual cases - so it tends to show up a bit more often in traditional programming 101 courses. It also promotes readability by making indentation a part of the language syntax.

That said, Javascript is readily available (a runtime in your browser), so no additional installation steps are necessarily required to start. Javascript also follows C syntax patterns which also appear in a number of other languages whereas python is a bit unusual in the way it distinguishes code blocks (using indentation).

Either will work, I think that python is a bit more straightforward for your first few programs.

Re: Is it better to learn JavaScript or Python as a first language?

#8
You'll ultimately want to learn both, but start with Python.

Python is the definition of a general-purpose, beginner-friendly language that can also be used for more advanced stuff. That's part of what makes Python such a good CS101 language.

JavaScript is primarily a client-side language focused on interacting with web browsers and the DOM. This is starting to change with the advent of Node.js, but I would _not_ recommend jumping straight into Node style evented-IO if it's your first language.

Re: Is it better to learn JavaScript or Python as a first language?

#10
post #2

JavaScript will be more friendly to you, and will open the doors to more applied languages, including Python. If you learn Python first, you might have trouble learning other languages. Ideally, in the end it wont matter - a programmer can program in any language, but for starters I would say start with JavaScript.

Why would learning Python make it difficult to learn other languages? Just curious.
Post reply on HN