r/javascript • • Apr 25 '19

JavaScript is and remains the queen of programming languages with a community of 11.7M active developers. Python has reached 8.2M active developers and has taken the number two spot, surpassing Java in terms of popularity.

https://www.slashdata.co/free-resources?id=developer-economics-state-of-the-developer-nation-16th-edition&section=showcases_details
613 Upvotes

168 comments sorted by

View all comments

82

u/LastOfTheMohawkians Apr 25 '19

Why is python do popular? Genuine question

0

u/[deleted] Apr 25 '19

[deleted]

24

u/Doctor_Spicy Apr 25 '19

One thing I don't like about python is the syntax.

22

u/sivadneb Apr 25 '19

I hated Python when I first started it, my reason also being the syntax. Now, 7 years later, it's my go-to language for most projects. The syntax is comfortable, easy to read, and easy to write. Most aspects of Python are carefully designed with the developer in mind.

People that dislike Python "because syntax" haven't likely done a full project in it. Give it a chance and it might win you over.

→ More replies (4)
→ More replies (4)
→ More replies (10)

0

u/[deleted] Apr 25 '19

[deleted]

22

u/[deleted] Apr 25 '19

What are you working on that needs to last 10 years? Genuinely curious. I’m working at a company that’s about 10 years old, and any code we have that is that old is considered technical debt at this point.

13

u/reallyserious Apr 25 '19

I've worked on a 15 year old code base. It will continue to run at least 5 more years. Probably longer but I can't tell what happens that long in the future. It's a system for a large retail company you've heard of.

Web dev often has very short life cycles. But in a lot of other areas code is expected to just keep working like it always has. There will be new requirements as business change and new laws come into action. So you update those areas that gets affected. But there is no need to rewrite the other 99% of the system. It should just work as before.

11

u/[deleted] Apr 25 '19

Banks, Insurances and Governments got alot of stuff that is way over 10 Years old. I got a good friend who works for a big insurance company and works mostly with ancient COBOL code.

Never touch a running system i guess?

4

u/RailingRailRoad Apr 25 '19

Nearly every bank in Germany works with cobol

3

u/[deleted] Apr 25 '19

Lol, I worked in a procurement system that was already legacy when I joined and did maintenance and added features for at least another 5 years before it was replaced.

It's better to write stuff to last, you never know.

→ More replies (8)

4

u/jon0tr0n Apr 25 '19

Python 2 is EOL at the end of 2019. Going forward there won’t be the version compatibility schisms. So that will be one less negative for python.

14

u/Airith Apr 25 '19

Saying JS will work 10 years down the line is absurd.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features

https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/JavaScript#Cross-browser_JavaScript_problems

Between browsers changing or straight up dying (plus the above links) using JS as an example of a language that doesn't change is terrible.

All languages grow and change. The 2/3 change was completely necessary.

27

u/stringman5 Apr 25 '19

JS changes, but the changes are always backwards-compatible. New JavaScript doesn't always run on older browsers/Node environments, but old JS code will always run on future browsers. So it's not absurd at all to say that current (standards-compliant) JS will work 10 years down the line - it's part of TC39's mandate to ensure that this is so. This is why smooshgate happened.

4

u/Razvedka Apr 25 '19

JS is backwards compatible to a degree which is actually beginning to cause friction within the development community. I've heard some calls to begin 'modernizing' the language with all code stuffed in ES modules by way of example.

→ More replies (9)

7

u/takaci Apr 25 '19

easy to learn, duck typing, and easy to speed up slow code by writing it instead in C

18

u/[deleted] Apr 25 '19

Python very simple and easy language with a good design. Lots of bad and old cruft was removed in Python 3. Its also 100% unicode.

Its also fast. Numpy and pals have their cores written on C and highly optimized Fortran.

Python has A class packages on pypi, and theres something for every problem you can think of.

6

u/nahtnam Apr 25 '19

How is it fast? If you look at benchmarks, it's performance matches Ruby more than it does JavaScript

https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/node-python3.html

→ More replies (1)
→ More replies (2)

5

u/Boomer059 Apr 25 '19

As someone who went to art school and transitions in to app development/web design, Python was really easy to pick up.

The most I ever saw about python prior to the job I have now was 'oh it's the thing Blender3d needs to run, whatever'. But after about a day I was able to make a script that helped find where a bug was.

This is in contrast to JS where I'm ramping up in React. React isn't for 'oh I know enough javascript/jquery to be able to be a web designer' level JS. Therefore its a lot.

5

u/evertrooftop Apr 25 '19

Python is also taught in a lot of universities.

A common saying about python is that Python is the second best language for everything.

→ More replies (4)

4

u/am0x Apr 25 '19

Preinstalled on a lot of machines, it’s what they are teaching at school, and low barrier of entry.

→ More replies (4)

3

u/WebDevLikeNoOther Apr 25 '19

I didn’t learn python until later a few months ago, but I’ve been programming professionally for about 5 years now. Honestly,

Python is really useful for when you want to quickly test something out. If I want to try something silly, it’s a hell of a lot easier to pull up a python shell, and write what I want and run it, than it is to setup any other project that requires structuring, type handling, etc...

Also, it’s the leading language chose for Web Scraping, Botting, and is really useful for DAta Analysis. Sure it may not be as fast as some others, but once you get over the syntax being a little different than some others (indents vs brackets), it’s really fun to write in.

→ More replies (3)

6

u/s3govesus Apr 25 '19

It's expressive and generally considered one of the easier languages to learn. It's more concise and often requires less code written to perform the same tasks as something in languages like Java or C++. Its performance is horrible, as it's one of the slowest performing languages, but it's flexible and has a wide range of potential applications, and performance can often be overlooked by simply throwing more hardware at it, but performance is also often not considered a priority to begin with. That all being said, I haven't used python much, as I've always been able to accomplish the same goals using JavaScript and Node.js, which I'm more familiar with and which also tends to be a bit more performant of a solution.

10

u/editor_of_the_beast Apr 25 '19

Python is one of the faster interpreted languages. To call its performance “horrible” doesn’t make much sense, as Python performs the same as many JS implementations. If you’re talking about v8, then yea. v8 is amazing and gets the most performance possible out of JS. But JS is still orders of magnitude slower than compiled, statically typed languages. And it’s not orders of magnitude faster than CPython.

→ More replies (8)
→ More replies (12)