r/ProgrammerHumor • • Aug 26 '20

Python goes brrrr

Post image
59.2k Upvotes

789 comments sorted by

View all comments

95

u/ilmmec Aug 26 '20

"Javascript goes b" + "r".repeat(10)

201

u/Xuval Aug 26 '20

This compiles to "Kill me, please, I was never meant to carry an entire website."

86

u/steeeeeef Aug 26 '20

Haha js bad

58

u/DeeSnow97 Aug 26 '20

Wonder when this sub is going to finally accept that JS today is not JS in 1995. Probably when it doesn't run code from 1995 anymore, aka never

23

u/[deleted] Aug 26 '20

if I'm being honest as someone who knows js the best it is a terrible language, but it really isn't as bad as people think

20

u/Piyh Aug 26 '20

You just have to know which dark alleys not to go down

→ More replies (1)

10

u/Noisetorm_ Aug 26 '20 edited Aug 26 '20

I mean it's got it's quirks, like how isNaN(NaN) typeof NaN evaluates to false or typeof null is object instead of null, but I wouldn't say it's a terrible language at all.

It's seriously versatile and pretty damn fast and with JavaScript's tight integration with HTML and CSS makes it really easy for you to set up visualization for your code.

2

u/CoolOutcast Aug 26 '20

isNaN(NaN) is true. You're thinking of typeof NaN is Number. Also, instanceof is a good way to check if an object is not null or undefined when typechecking

2

u/DeeSnow97 Aug 26 '20

For the last time, NaN is a valid floating point value and it's not JS-specific, it's as defined by the IEEE and it has been literally etched into the silicon of whatever device you're reading this on. It is indeed a little more prevalent in JS due to bugs interfacing with the type coercion, but it works the same way in every other language.

There is even such a thing as -NaN, and yeah, not just in JS, in your favorite language as well. Unless it just categorically ignores floats.

→ More replies (1)

2

u/marty_byrd_ Aug 26 '20

It's not a bad language in anyway, does it have some odd gotcha's? Yea, but it's almost never an issue and I write it daily. It's a meme, nothing is wrong with js

→ More replies (10)

3

u/ric2b Aug 26 '20

When it fixes the ridiculous behaviors it has. That will never happen because of backwards compatibility, you'll just get new API's that are nicer, sort of like how C++ evolved.

It will always be an awkward language.

→ More replies (2)

2

u/GimmeCata Aug 26 '20

Never probably. PHP evolved greatly during its popularity peak yet it always being 'PHP bad'.

0

u/[deleted] Aug 26 '20

[deleted]

2

u/Kartelant Aug 26 '20 edited Apr 01 '26

redacted for privacy

→ More replies (1)

3

u/Xuval Aug 26 '20

I would never say js is bad. Just like I'd never say a hammer is bad. But if you are gonna build your house out of hammers, I am gonna be amused by that, even if it is a perfectly functional house.

14

u/mrchaotica Aug 26 '20

The worst part is, we almost had Scheme or Python in the browser instead.

0

u/[deleted] Aug 26 '20

[deleted]

10

u/mrchaotica Aug 26 '20

Python: the web basically looks the same as today, but Python gets ruined as each browser adopts new standards with each update. Guido publicly distances himself from PythonScript

Probably the opposite, actually. Something more like "the web uses Python, but it's still stuck on Python 2."

→ More replies (1)

7

u/renrutal Aug 26 '20

I can see the schemers and snake people sighing in relief dodging that bullet.

3

u/mrchaotica Aug 26 '20

What do you mean? As a schemer and snake person silly-walking person, I think It would have been glorious.

4

u/DeeSnow97 Aug 26 '20

compiles?

4

u/ric2b Aug 26 '20

Just in time.

→ More replies (1)

12

u/Professor_Dr_Dr Aug 26 '20

repeat is better, way more readable in a lot of cases

I mean hell, if you multiply two variables how are you supposed to know which one is the String and even if the result will be a String at all (instead of e.g. an int)

0

u/[deleted] Aug 27 '20

[deleted]

1

u/Professor_Dr_Dr Aug 27 '20

Doesn't work, I have not once seen someone use a variable like idString or idLong even though it might be either of those.

Sensible names won't fix everything and even if they did most wouldn't use them regardless

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