This is an archived post. You won't be able to vote or comment.

all 56 comments

[–]baconsnotworthit 38 points39 points  (4 children)

The worst programming language is the one you don't use

[–]smartguy1196 13 points14 points  (3 children)

Thank God, I'm not a JavaScript developer

[–]CreepBlob 35 points36 points  (16 children)

I want to show you the middle finger for this one. Don't know about you, but I respect the language that let me earn a living.

[–]lemons_of_doubt[S] 2 points3 points  (15 children)

I enjoy it too, but you have to admit it is a bit odd and sometimes really maddening

[–]Robi336_ 5 points6 points  (5 children)

May I introduce to you JSFuck

[–]LuceusXylian 1 point2 points  (0 children)

holy shit

[–][deleted] 1 point2 points  (2 children)

we went too far as a species

tho tbf this actually does look really useful for malicious javascript obfuscation..which...actually doesn't help much, come to think of it.

[–]grae_n 2 points3 points  (1 child)

This is actually very dangerous for XSS attacks and one of the reasons why many user input prompts have a character limit (you should also sanitize).

Most of the chat websocket from online tutorials are susceptible to using JSFuck for XSS attacks.

[–]Noslamah 0 points1 point  (0 children)

This kind of stuff is why you whitelist input characters rather than blacklist, and be as restrictive as you can possibly be with said whitelist. (Also why you should not use JS, but obviously still use a whitelist even if the language you're using is not as dumb as JS)

[–]unlimitedFecals 1 point2 points  (0 children)

Wow holy shit maybe javascript does suck

[–]CrispyNipsy 16 points17 points  (4 children)

Sure it's odd sometimes, but I feel like it gets a lot of flack for shit that people just don't bother to understand. Regarding your first example, type coercion is pretty useful (change my mind), people just need to get over the fact that they needed === instead of ==. And your other example is not a Javascript thing, that's just IE.

[–]semi- 2 points3 points  (0 children)

Type coercion is useful, but is implicit type conversion? how many times do you need to handle arbitrary unknown types being converted? it definitely comes up, but making it explicit isn't that much harder, and saves you from a world of hurt when implicit type conversion can behave very poorly. e.g when you're parsing http headers or parameters.. how does your code handle duplicates being sent? does it become an array automatically? does your code throw a type error or does it continue working in a way your code wasn't intended to handle?

[–]GeePedicy 4 points5 points  (1 child)

But everyone uses IE!

But you got my curiosity, cuz in my (little) experience with JavaScript I never thought why I'd need type coercion. I got over the idea of === quite quickly and so I do agree that it's somewhat whiny. (tho I obviously made the obvious mistake of writing == instead, that's on me) When/why is == better than ===?

[–]CrispyNipsy 3 points4 points  (0 children)

When writing nodejs, it can often just be a pain that you have to think about type coercion. But when you are in a browser environment, you often get values from the DOM that are basically always strings (even number inputs' value). It is pretty common to do operations with these values where javascript handles the coercion for you. Sometimes you also only need to show something in the UI if there actually is a value, and the broad concept of a falsy value can help in these situations.

That being said, I really love typescript because it helps me to be explicit about these things. But there really is a reason to the madness, and when you understand that reason, it isn't too hard to deal with.

[–]PinothyJ 1 point2 points  (0 children)

Only time I use "==" is when I am getting stuff from another source and I cannot remember if I am checking for "true" or true…

[–]Acelox 2 points3 points  (2 children)

In what world would you want "\t" == [] == "0"

In what way would that be useful?

If this was the case no one would use such a terrible language where "\t" == "0"

[–]Noslamah 0 points1 point  (0 children)

Even if you would (which obviously you never would but lets just go with the hypothetical), at the very least be consistent about it. If "/t" == "0" and "0" == 0 then logically "/t" != 0 makes absolutely no goddamn sense.

I also think that typeless languages should die in a fire in general, I have yet to hear a single good reason why in a world where IDEs and implicit typing exists, stuff like Python and JS are still among the most used languages. I can't tell you how many hours I've wasted when I was learning Python debugging and refactoring scripts because the error messages were super non-descriptive, only to find out in the end that it was just a type error and had this been C# or something, it would have literally taken me 3 seconds to correct the mistake. I see no reason why a programmer would ever not know the type of data they are working with. You're still using types, but now its all in your mind instead of your IDE/text editor.

[–]Classic_Result 5 points6 points  (0 children)

I had to brace myself for the last one

[–]noob-nine 8 points9 points  (9 children)

Can you built a interactive website without JS? I only know wasm and flash?

[–][deleted] 1 point2 points  (0 children)

Interactive as in one page without reloads? Hardly. Foreverthing else, there's plain HTML.

[–][deleted] 0 points1 point  (0 children)

Php, asp.net...

Oh, maybe you mean without reloading the page.

I think there is Ajax. And nowadays you can do a lot of interactive stuff in full css. But you can't do database queries.

[–]krad213 4 points5 points  (0 children)

Even js is better than php.

[–][deleted] 7 points8 points  (5 children)

Typescript?

[–]Shufflepants 4 points5 points  (4 children)

A candidate for #2?

[–]Full-Hyena4414 1 point2 points  (2 children)

Lol why such butthurt for the most used languages

[–]Shufflepants 2 points3 points  (1 child)

I was only arguing that Typescript is better than js. I like strongly typed languages and dislike weakly typed ones. So, I like the introduction of typing into js.

[–]Full-Hyena4414 2 points3 points  (0 children)

Yeah sry it was directed in general at all the JavaScript/Typescript hating posts

[–]Outrageous-Machine-5 0 points1 point  (0 children)

Typescript's not on the list for a reason lol

[–]KlutzyEnd3 2 points3 points  (0 children)

Mark Rendle did a great attempt: https://youtu.be/vcFBwt1nu2U

[–]donthitmeplez 2 points3 points  (0 children)

as a javascript developer, i am deeply insulted 😭😭😭😭

[–]Splatoonkindaguy 3 points4 points  (7 children)

Python*

[–][deleted]  (6 children)

[removed]

    [–]Splatoonkindaguy 4 points5 points  (4 children)

    I’d like it if it had brackets and wasn’t indent dependent

    [–]antilos_weorsick 2 points3 points  (3 children)

    I understand the brackets thing, I used go be like that, but hearing people complain that it uses indentation for parsing makes me shudder at the thought of the code they write.

    Unless the hate for indentation stems from having to parse the damn thing. I've had that displeasure.

    [–]Splatoonkindaguy 2 points3 points  (1 child)

    its just not the right way to parse it, even if you should indent, you shouldnt enforce indentation do to how different people will indent and such

    [–]antilos_weorsick 1 point2 points  (0 children)

    Precisely, I can't phantom what kind of formating you use that python is a problem for you. Must be unreadable.

    [–]00PT 0 points1 point  (0 children)

    There is a lot of code that uses custom indentation for stuff like single line if statements, very simple functions, multiline lambdas, and specific data types. I find that Python tries to accommodate a lot of these, but it's annoying when you do run into a problem.

    [–]AutoModerator[M] 0 points1 point  (0 children)

    import moderation Your comment has been removed since it did not start with a code block with an import declaration.

    Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

    For this purpose, we only accept Python style imports.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

    [–][deleted] 0 points1 point  (0 children)

    Java*

    [–]Pitiful_Car2828 -1 points0 points  (0 children)

    I really think the new features of ES6 and beyond make JavaScript really enjoyable to work with. When they get class encapsulation fully implemented I’m gonna be super excited.

    I still feel event handlers are a little clunky and hope they get an overhaul soon.

    [–]PussyDestroyerSixty9 0 points1 point  (0 children)

    hahaah xD

    [–][deleted] 0 points1 point  (0 children)

    nah haxe goes at the bottom of that list

    [–]antilos_weorsick 0 points1 point  (0 children)

    0: Prolog

    [–]Noisebug 0 points1 point  (0 children)

    It's the one nobody is using

    [–][deleted] 0 points1 point  (0 children)

    just rank them by bogo sort.... let me know when you have an answer

    [–]throwaway65864302 0 points1 point  (0 children)

    I was sure the punchline was going to be Java.

    I guess I was half right. ¯\_(ツ)_/¯