r/ProgrammerHumor • • Mar 20 '24

Meme areJSDevsActuallySane

Post image
14k Upvotes

554 comments sorted by

View all comments

Show parent comment

6

u/kimtaengsshi9 Mar 20 '24

It's the same situation for JS and Python. JavaScript was originally intended for simple scripting for webpages, in earlier times when we couldn't imagine just how powerful 21st century websites would become, while Python was intended to be simple. Strict typing was either considered unnecessary or undesired. It was a conscious design choice, and back then the concept of good programming practices and engineering wasn't very mature yet.

Fast forward to today, and strict typing is more important than ever for good code and such. NodeJS and Python are among the world's most popular languages now, however since typing wasn't originally part off the language's design, they've to retrofit and introduce it in a roundabout way which won't break legacy code.

In other words, JS does weird stuff like this because of old design decisions. It's always legacy, legacy, legacy.

2

u/sofaRadiator Mar 21 '24

At least Microsoft got some of the best language developers in the world for TypeScript, and though it does have a few rough edges, overall they’ve done an astonishing job rationalizing the insanity we started with. 

Python’s typing is still… really not great. 

Better than Ruby’s, though. Urg. 

1

u/kimtaengsshi9 Mar 21 '24

Python typing is just Geneva ​Suggestions. It's added to help developers in the IDE, but strict typing is still considered against the Python philosophy.

It's not so bad tbh, for the most part, but ​​​​​​​​​​​boy do I wish there's better support for defining DataFrame type definitions.​​