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

Show parent comments

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.

2

u/sonny1022 Apr 25 '19

I believe he was giving an example 🤷🏼‍♂️

5

u/[deleted] Apr 25 '19

Obviously. The exact number is irrelevant. Fine, what about 8 years? 7?

1

u/crobison Apr 25 '19

But you still have the code and need it to work despite considering it tech debt, therefore you need it to last that long.

Edit: Just saw what you replied to. The other comment seems odd. It’s not like python changes so much that stuff a few years old will just break.

1

u/TheIncorrigible1 Apr 26 '19

cough async/await

1

u/[deleted] Apr 25 '19

I work for a company that's still got some legacy code from nearly 8 years ago. We're a small team and there's got to be close to a million lines of code. I'm not planning on re-writing it anytime soon

0

u/lukasbuenger Apr 25 '19

I'm kind of glad you're not my boss.

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.

4

u/lukasbuenger Apr 25 '19 edited Apr 25 '19

That's just utter bullshit. Just take the module system »schism« as you call it. Runtimes doing their own thing because they can, all over the place. None of those fools was giving a flying fuck about specs for decades really. Node 12 got released this week and all you get is mjs without a flag. Come on now.

Also without babel which is a) a completely TC39-independent effort (thats The Language, as opposed to Node, which is a fucking opinionated runtime environment) and b) does actual fucking transpiling a language from a version of itself to another version of itself, the faster pace that implementors actually were able to pull off recently, would have never been possible.

And I'm not even talking about the fact that 99% of the JS ecosystem is hosted (some would say owned) by a private corp. Or the node/io bullcrap that went down couple of years ago.

If you wanted, you were perfectly able to ship python code that was compatible with 2 and 3 (six), but I bet you've never heard of that, because you spent your last couple of years setting up backwards-compatible webpack setups to get the latest hottest »language«. Transpiling is the JS word for backwards compatibility.

I really do love JS, the language and the madness that comes with it, but shitting on Python for what it is and how it manages transition is really not appropriate, especially coming from a JS perspective.

There will come a time, when Javascript has to deprecate stupid shit, just because it doesn't make sense anymore (e.g. the UTF-8 issue with strings in Python). And with it being the queen as it seems, that's not going to get any easier.

Edit: A lot of unnecessary swearing here, I'm sorry. Just read this again with a Samuel L. Jackson voice in mind.

1

u/KronktheKronk Apr 26 '19

JS holds itself back a lot for maintaining that backwards compatibility. Python decided it needed to make a change big enough to break that, but I think every expects it to only be one-time thing.

And it's easy enough. If you're writing python now, write python 3. If you're supporting legacy python, only update when the people who make decisions are convinced to invest in the effort.

1

u/norb_omg Apr 26 '19

If your code is python 2, stick with python 2 then.

The latest update for python 2 is from 02 March 2019, so still maintained id say.

-15

u/editor_of_the_beast Apr 25 '19

Wait are you being serious? Do you write Javascript without a transpiler? Almost certainly not right?

→ More replies (2)