Javascript or Python?

Let’s discuss the pros and cons of both of these languages, Who wants to start?

2 Likes

I’m personally more of a JS fan, simply because it’s what I’ve used most. That and I much prefer the use of { } over Python’s indentation-based blocking.

That said, there’s also all the little JS quirks that can be annoying, take things like [] == ![] for example. It does make sense if you look into it a little but it’s not intuitive at first glance.

I’d say the biggest determiner is usage, for web development, JS is far superior given things like all the available frameworks like React, built in DOM manipulation and cross compatibility across all browsers. But for something like data science? Well that’s far more Python’s forte given modules like Pandas, Tensorflow, Numpy etc. Depending on the application, one language may be far more suited and be the better overall choice.

Both are pretty awesome general languages though, I really like both :slight_smile: .

6 Likes

Python is simpler to learn but JS is natively supported in all popular browsers. There are a million more things like no braces in Python (I don’t like that personally). It’s impossible to list them all.

4 Likes

One question, have you ever made a Game from scratch?

1 Like

No, I haven’t. I am currently learning Phaser.js thought so I will once I finish learning.

2 Likes

Nice :+1: you should try it sometime, its really fun but frustrating at the same time if you understand it right!

2 Likes

These are just my thoughts…

Python:

When it comes to handling information, I’ll prefer Python. Something about the way data flows between types within feels so natural and easy. Plus it’s logic is straight forward and it’s error handling is excellent.
It also has so many libraries written for it that you can use it in just about any field. As was previously mentioned, it’s especially good for Data Science. It’s also excellent for AI.
However it’s… messy is the only word I can think of. The indentation system is clumsy, and doesn’t allow nearly as much flexibility.

Javascript:

Javascript was built to integrate with the web, so anything networking it just seems to flow better. At face value it’s logic is incredibly irritating but once you understand how things are evaluated not terrible (except when you add values that shouldn’t be added)

It’s biggest advantage to Python though (again in my opinion) is how clean it is in comparison. I find it so much easier to build a big application with JS than Python, especially with how it imports and exports modules. It has a clean, easy to read look to it.


With all that, I pick Python if I want to:

  • Brainstorm logic
  • Complete a code challenge
  • Write a short script

And JavaScript if I want to:

  • Do pretty much anything web related
  • Build a full scale program (that’s not written in C)
4 Likes

Very good question, from my point of view if you are just starting out in programming I would lean towards Python, due to its simplicity compared to JS (it is minimal) and then jump to JavaScript, just because JS dominates the web market and its versatility (including Mobile). Although your objectives will depend on how to focus on data or Back-End or be Front-End or Full Stack with a single language, in any case, both languages ​​work in a similar way (both are interpreted).

1 Like

No, I have not made a game from scratch.

1 Like

Between Javascript and Python, which you can find a freelance job easier?

2 Likes

Take this with a grain of salt as I’m only a hobbyist.

From what I’ve seen and heard I would say Javascript as a web developer. That seems to be the easiest area you can get a job, both as a freelancer and as an employee. Again, just a hobbyist, so worth doing doing your own reading on it. :slightly_smiling_face:

3 Likes

I agree with 8-bit-gaming, as javascript provides versatility in your freelance pursuits. Since Python is solely numerical data, it limits an employee/freelancer to data intensive tasks. You should visit Berkeley’s Master of Financial Engineering program and call them and chat. I’m sure they would provide additional details on how they instruct their students.

1 Like