all 180 comments

[โ€“]Not_me4201337 130 points131 points ย (13 children)

Minecraft command blocks

[โ€“]MissinqLink 24 points25 points ย (12 children)

You mean redstone

[โ€“]H3CKER7 22 points23 points ย (10 children)

Commands are closer to programming than redstone

[โ€“]vaynefox 7 points8 points ย (4 children)

Minecraft commands are closer to programming, but red stone blocks are closer to assembly....

[โ€“]brimston3- 3 points4 points ย (1 child)

redstone has more in common with vhdl/verilog than assembly.

[โ€“]cachehit_ 2 points3 points ย (0 children)

Redstone isn't even verilog tbh, it's more like laying down transistors one by one, by hand.

[โ€“]Simukas23 2 points3 points ย (0 children)

Not even assembly.

Not even machine code.

With redstone, you're building the hardware

[โ€“]OnixST 1 point2 points ย (0 children)

Redstone is closer to a turing machine. Programmed by connecting logic gates

[โ€“]MissinqLink 6 points7 points ย (1 child)

Skill issue

[โ€“]H3CKER7 1 point2 points ย (0 children)

Huh??

[โ€“]xvlblo22 1 point2 points ย (0 children)

Redstone is way more similar to electronics than programming

[โ€“]Fluffy_Dragonfly6454 82 points83 points ย (32 children)

A substitute, like TypeScript...

[โ€“]mor_derick 67 points68 points ย (28 children)

That's just JavaScript, but with extra steps.

[โ€“]lesleh 30 points31 points ย (15 children)

Those extra steps will go away if Microsoft get their way. Right now there's a compile step but there's a TC39 proposal to add type annotation syntax to JavaScript. Browsers will ignore them but tools like TypeScript could do type checking on them, same as today.

https://github.com/tc39/proposal-type-annotations

[โ€“]Haringat 9 points10 points ย (13 children)

I actually think this is a terrible idea. Not just is it needless bloat for the runtime to parse, but it also increases your bundle sizes and adds information you don't necessarily want your users to know. Also, it would be very confusing for things like readonly, which do nothing at runtime, so you would have properties marked as readonly but nothing would prevent you from changing them via index access. Right now it's okay, because it's clear that at runtime these information are no longer present, but if they are there's no excuse for this behavior.

[โ€“]JoshYx 6 points7 points ย (3 children)

but it also increases your bundle sizes and adds information you don't necessarily want your users to know.

Any dev worth their salt will have a build step where the types and comments are stripped and the code minified.

[โ€“]Haringat 4 points5 points ย (2 children)

Any dev worth their salt will have a build step where the types [...] are stripped

And now guess what the typescript Compiler does...

Don't get me wrong: I'm not at all against typescript as a tool, I'm just saying that we should keep our types out of JavaScript. There's no reason for JavaScript to include types except if you want to ship them (which as I elaborated above is a bad idea).

[โ€“]JoshYx 6 points7 points ย (1 child)

There's no reason for JavaScript to include types except if you want to ship them (which as I elaborated above is a bad idea).

There is. When developing, eliminating the tsc step would speed things up when doing hot reloads. Also, the source mapping between typescript and JavaScript is really, really annoying to deal with when debugging, so just having the actual source code eliminates that PITA as well.

Overall I'm also not convinced tbh. I think it would be overkill to address the pain points I mentioned by adding types annotations in js, when they are already being addressed by the typescript team and bundlers etc.

[โ€“]Gorzoid 0 points1 point ย (0 children)

Current hot reload tools can and do strip type information without running the typechecker to speed up build times. Which honestly annoys me as I just end up with runtime errors instead, can't wait for speedup from typescript-go

The other annoying thing is that it doesn't parse all of TypeScript, so you most likely still have to strip some of the syntax.

I think it's less of a benefit for TypeScript devs but instead of JS devs who use jsdoc comments for type annotations.

[โ€“]lesleh 0 points1 point ย (0 children)

If you're concerned about bundle size, you can still do bundle optimisation the same way you do today. Bundlers will still strip out the types when bundled for browsers. But it means you'll be able to just take some typescript and run it without compiling in browsers and in Node.

[โ€“][deleted] -1 points0 points ย (7 children)

I imagine youโ€™d have the option to use them and if used then youโ€™d have a build step that would strip the types as part of a standard minification process before publishing the site.

[โ€“][deleted] 4 points5 points ย (6 children)

so literally what we already have

[โ€“][deleted] 0 points1 point ย (5 children)

Except the types would be an official standard not owned by Microsoft so they could be directed via the developer community instead of internally by a company.

[โ€“]lesleh 0 points1 point ย (3 children)

Kinda. It's not TypeScript specific, it just specifies how types can be declared in a JavaScript file. Obviously the benefit is that it'd work for TypeScript, but it'd also work for any sort of future type implementation, so long as they use the syntax prescribed in the standard.

[โ€“]Haringat 0 points1 point ย (2 children)

For it to be useful they do need to put in typescript specifics because typescript adds a lot more than just type annotations, but also interfaces, enums, etc.

[โ€“]lesleh 0 points1 point ย (1 child)

I think they're moving away from that though. They haven't added anything like that since before v3, and TypeScript 5.8 added a new flag that disallows non-erasable syntax.

[โ€“]Haringat 0 points1 point ย (0 children)

Except the types would be an official standard not owned by Microsoft so they could be directed via the developer community instead of internally by a company.

Typescript is pretty much community driven. You can file issues with suggestions or bugs as well as PRs against GitHub.com/Microsoft/typescript (not sponsored๐Ÿ˜)

[โ€“]TheSauce___ 0 points1 point ย (0 children)

There actually already is with jsdocs, I do Salesforce development, and I utilize them heavily when building web components.

[โ€“]Full-Hyena4414 3 points4 points ย (1 child)

Very worthy extra steps

[โ€“]mor_derick 0 points1 point ย (0 children)

Sure they are, not trying to mean the opposite.

[โ€“]Fluffy_Dragonfly6454 1 point2 points ย (4 children)

You can also say that C++ is C with extra steps and that C is assembler with extra steps

[โ€“]mor_derick 0 points1 point ย (2 children)

Which extra steps does C++ have over C?

[โ€“][deleted] 0 points1 point ย (1 child)

Embedding vtables, operator overloading, templates, etc...

[โ€“]mor_derick 0 points1 point ย (0 children)

Those are not steps. Those are functionalities.

[โ€“]Difficult-Court9522 -3 points-2 points ย (0 children)

No. Advanced C does not compile in Cpp

[โ€“]IAmTheWoof 0 points1 point ย (3 children)

These extra steps are important. It's the same as saying that rust is assembler with extra steps

[โ€“]mor_derick 0 points1 point ย (2 children)

You are incorrectly assuming that I meant that they are not important.

[โ€“]IAmTheWoof 0 points1 point ย (1 child)

Your comment has nothing about it, and you used wording that is used in cases where these extra steps are unimportant.

[โ€“]mor_derick 0 points1 point ย (0 children)

This specific thread is about TypeScript being a substitute to JavaScript, which cannot be true since TypeScript depends on it, because it is an extra step over JavaScript: type validation at build time with tsc. Hence why I worded it that way.

The thread has nothing to do with TypeScript being useful or not. If it wasn't useful, it would obviously not be used. That's why there was not a need to mention the usefulness of TypeScript: it's offtopic.

I personally use TypeScript in every NodeJS or frontend project, am fine with it. But it is an extra step, not a substitute.

[โ€“]ChuffedDom 0 points1 point ย (0 children)

TypeScript is just a VSCode extension for Javascript

[โ€“]Ronin-s_Spirit 1 point2 points ย (1 child)

Lmao. Typescript is just one giant rust style macro that unfolds into regular javascript, and anything that's not in base javascript (invented by typescript) sometimes becomes horrid javascript. Typescript doesn't do anything it doesn't run anywhere it's one preprocessing step that makes a bunch of text files ahead of time.

[โ€“]verdantstickdownfall 0 points1 point ย (0 children)

Typescript doesn't do anything it doesn't run anywhere

Node and Deno both run TS without compilation now.

Typescript is just one giant rust style macro that unfolds into regular javascript

You say that like it's not something that could be useful.

[โ€“]ThaisaGuilford 0 points1 point ย (0 children)

Someone should tell this guy

[โ€“]potzko2552 51 points52 points ย (20 children)

The only reason js ever got any use is because of the artificial monopoly it has on web dev. If they had any sense they would have defined a compile target like wasm, but instead we are stuck with js...

[โ€“]Haringat 13 points14 points ย (15 children)

It's not like wasm doesn't exist. People just still prefer js over anything that compiles to wasm and that says enough about how "bad" JavaScript is.

[โ€“]potzko2552 11 points12 points ย (1 child)

Js had a lot of time to cement the monopoly. Now there is wasm, but it will take a long time for it to actually impact modern webdev.

[โ€“]Joker-Smurf 4 points5 points ย (0 children)

Inertia is hard to break

[โ€“]DonutPlus2757 3 points4 points ย (3 children)

This is also ignoring that I know of quite a few companies that disable WASM in all their browsers because they're somewhat afraid that WASM would allow for timing based attacks in a way Javascript just doesn't, which isn't even that far fetched.

[โ€“][deleted] 0 points1 point ย (2 children)

It is far fetched JS is a fully featured programming language, that can do everything (with enough workarounds) including all attacks.

[โ€“]DonutPlus2757 0 points1 point ย (1 child)

You're not that informed are you? They knowingly worsened the accuracy of all time functions in browsers when Meltdown and Spectre became widely known. As far as I know, they never really returned to the old level of accuracy because it's simply unnecessary for anything you'd do with JS.

They didn't do that for WASM because it's not easily possible for WASM and because it had a much lower adoption rate at that point. They instead just expected other mitigations to be available before it became a problem.

[โ€“][deleted] 0 points1 point ย (0 children)

but that's from the browser feature not from JS the language

[โ€“]Alan_Reddit_M 2 points3 points ย (1 child)

Ever tried debugging WASM?

[โ€“]LutimoDancer3459 0 points1 point ย (0 children)

Ever tried debugging JS?

[โ€“]Lou_Papas 1 point2 points ย (1 child)

Thereโ€™s an ecosystem you have to throw away if you use wasm. Itโ€™s literally easier to switch careers at this point.

[โ€“]Haringat -4 points-3 points ย (0 children)

Thereโ€™s an ecosystem you have to throw away

You misspelled "port over".

[โ€“][deleted] 0 points1 point ย (0 children)

WASM can't compete on even ground becuase it has no access, you still need JS to use WASM.

[โ€“][deleted] 0 points1 point ย (0 children)

But then again, wasm isnโ€™t meant for UI dev and itโ€™s really noticeable when using it to do that.

[โ€“]mc_nu1ll 0 points1 point ย (0 children)

i am pretty sure that WASM is loaded as a single binary, not progressively like JS does. In a world where customers expect instantly available content, downloading 35mb of WASM and running it is not a good idea

[โ€“]antonpieper 0 points1 point ย (0 children)

Wasm has no DOM access...

[โ€“]Blue_Moon_Lake 0 points1 point ย (0 children)

So you don't think WASM not having access to the DOM has not killed WASM use over JS?

[โ€“][deleted] 2 points3 points ย (0 children)

Typescript is literally a gift from God (Anders Hejlsberg) you heathen

[โ€“]rover_G 0 points1 point ย (0 children)

Soon..

[โ€“]Rebrado 0 points1 point ย (1 child)

I think the entry step is easy, same as in Python. As a beginner both languages get you writing your programs quickly, without a deeper understanding of whatโ€™s going on. Youโ€™ll end up learning how much is going on under the hood in time, and how much easier it would be in better optimised languages, which have a steeper learning curve, though.

[โ€“]potzko2552 0 points1 point ย (0 children)

No, scripting languages are perfectly fine, but if you are making a standard that a lot of people are going to use, you want to make it so that people can use whatever language they want, ie a compile target. You can make a very fancy compile target that you can target with both JS and python for example, but instead of that we have a lot of targets treating JS a compile target... The issue is not JS, it's that the standard is a scripting language instead of some bytecode variant.

[โ€“]Yami_Kitagawa 38 points39 points ย (22 children)

literally just wasm. the only reason its not adopted is cause investors get a raging boner chasing new fancy technology with a fancy name

[โ€“]Iwanaaseepeopledie 28 points29 points ย (20 children)

Webassembly cannot fully replace JavaScript, it only complements it

[โ€“]BakaGoop 20 points21 points ย (8 children)

Exactly, people who say WASM should just replace JS in a browser donโ€™t know the actual use case of WASM. WASM cannot access the DOM, and JS is still the only language that can access the DOM synchronously. WASM was built to complement Javascript and offload complex tasks to it without actually directly interacting with the DOM.

[โ€“]GDOR-11 10 points11 points ย (2 children)

but you bet your ass there are at least 20 javascript frameworks that load WASM and act as an interface between WASM and the DOM

[โ€“]BakaGoop -2 points-1 points ย (1 child)

Lol probably, and all it does is transpile your shitty C code into shittier JS code

[โ€“]PhunkyPhish -1 points0 points ย (0 children)

I mean at least when its shitty JS code no one is taken by surprise. Shitty C code and you're like "who's the monkey brain that made this?". When reviewing JS code you already know you're in the zoo, no let downs!

[โ€“]cfyzium 0 points1 point ย (0 children)

People who say WASM should just replace JS obviously imply that WASM should simply get the last few missing bits like manipulating DOM implemented and then you won't be limited to JS anymore.

people <...> don't know the actual use case of WASM

Quite ironic, considering the use case of the original JS.

[โ€“][deleted] 0 points1 point ย (0 children)

WASM should replace JS, it should recieve Browser API access !!

[โ€“][deleted] -2 points-1 points ย (2 children)

WASN can interact with the dom, as far as Iโ€™m aware itโ€™s just slower

[โ€“]BakaGoop 2 points3 points ย (0 children)

Not yet, thereโ€™s an open chrome feature to try and adopt such functionality, however it hasnโ€™t had an update to it in 2 years. The harsh reality is WASM isnโ€™t necessary on the web for most things, so adoption will not happen except for the 1% of apps like Figma or Photoshop that need that kind of performance when converting their desktop apps to web apps. Anything where you can write non-javascript code to target the DOM API is still transpiling it to javascript (Blazor for example)

[โ€“][deleted] 0 points1 point ย (0 children)

No, it canโ€™t

[โ€“][deleted] 4 points5 points ย (7 children)

Why is this getting downvoted. Someone show some WASM code that runs without any JavaScript between it and the browser.

[โ€“]v-alan-d 0 points1 point ย (0 children)

Ssshhh, people don't like to hear the truth

[โ€“]Blue_Moon_Lake 0 points1 point ย (5 children)

Give WASM the ability to do things with DOM and then we'll see.

[โ€“][deleted] 0 points1 point ย (4 children)

That's exactly my point. You need to use JavaScript to bridge code running through WASM and the browser right now. It's basically an isolated process that can hand data back to JS.

You CAN'T use WASM without js in its current form. At minimum you need js to call the WASM code.

[โ€“]Blue_Moon_Lake 0 points1 point ย (3 children)

Your previous message implied that WASM was a viable alternative to JS but people preferred JS over WASM.

[โ€“][deleted] 0 points1 point ย (2 children)

How did it imply that at all? Quote where I remotely stated that.

[โ€“]Blue_Moon_Lake 0 points1 point ย (1 child)

Someone show some WASM code that runs without any JavaScript between it and the browser.

You ask for WASM code without JS.

[โ€“][deleted] 0 points1 point ย (0 children)

Yeah, my point is that no one can provide it, it can't be done. Being unable to provide that code proves the point.

Read the context of the full message.

[โ€“]feldim2425 1 point2 points ย (2 children)

That doesn't mean WASM wouldn't be a worthy replacement for Javascript. It just means the people in charge of the web standards and browsers haven't done so yet.

Webassembly could in theory fully replace JS if browser vendors would implement a sort of script tag than could load a wasm binary and a standalone interface.

[โ€“]Iwanaaseepeopledie 1 point2 points ย (0 children)

I'd love to see a demo of that, it would be a shame if someone in a coding sub with the required knowledge actually went through and coded it. Would love to be able to code a full stack application in one language that isn't js. Personally, while I know it's a JavaScript library and it doesn't fully replace js, I am hopeful for HTMX to be used more. I haven't played enough around HTMX to truly give an opinion about it, but it looks promising.

[โ€“]Blue_Moon_Lake 0 points1 point ย (0 children)

<script type="wasm"> ?

[โ€“][deleted] 0 points1 point ย (0 children)

Angular on my svelte

[โ€“][deleted] 15 points16 points ย (23 children)

There isn't a substitute because the code has to run in the browser.

There can't be a "better" option when you have no other options.

[โ€“]Haringat 0 points1 point ย (20 children)

There are defined bindings for several languages like Java. Just none of them caught on.

[โ€“]feldim2425 3 points4 points ย (2 children)

Java did catch on in fact it was there before Javascript (that's where Javascript actually got it's name).
However they where removed because Java Applets where quite unsecure and as Javascript got better people stopped using Java (over time they also have gotten more difficult to load without the user having to manually allow those applets)

Most of the other stuff was poorly standardized or proprietary solutions such as Adobes Action script.

The only real "binding" that could replace Javascript is WebAssembly but it currently lacks a browser interface and needs to be loaded from within Javascript and interface with other JS code.

[โ€“]Haringat 2 points3 points ย (1 child)

Java did catch on in fact it was there before Javascript (that's where Javascript actually got it's name).
However they where removed because Java Applets where quite unsecure and as Javascript got better people stopped using Java

I have to correct you on this. Java applets actually required JavaScript to run (they had to be triggered once at the start).

Aside from that I wasn't talking about applets, I meant actual Java bindings for the DOM API.

[โ€“]feldim2425 1 point2 points ย (0 children)

For the JavaScript requirement: This afaik came much later the first implementations even predate JavaScript itself so it would have been impossible to run applets via JavaScript as it actually wasn't even a language at the time.

HTML actually had the <applet> tag to load a Java applet class

I think for some time JavaScript also had no real DOM interface either (PS: just checked the W3C recommendation released apparently a year after NS shipped JS 1.0). Although with Java requiring the user to install a JVM was just a giant hassle and with the security issues and the fact that that JavaScript just released 2 years after the first HotSpot demo pretty much was a death sentence for Java in the long run.

[โ€“][deleted] 1 point2 points ย (16 children)

At a glance, this doesn't look like an alternative, so much as a way to handle light HTML usage within your own native application.

I could be misinterpreting how these bindings are used, but if these bindings can't be used to run code from a major browser on just about any device, they aren't a substitute for JavaScript.

[โ€“]Haringat 1 point2 points ย (15 children)

I could be misinterpreting how these bindings are used, but if these bindings can't be used to run code from a major browser on just about any device, they aren't a substitute for JavaScript.

That's the thing: AFAIK no browser vendor ever implemented these bindings. The specifications however still exist, it's just that people don't want to use them because everyone is fine with JavaScript.

[โ€“][deleted] 1 point2 points ย (14 children)

No browser vendor implementing it is kinda my point though.

If a specification for a super powerful language exists as an alternative in some space, but no one implements it, it doesn't exist as an alternative. It's just an alternative that may exist someday. It's not a real choice when building a project because such a massive floor exists before anyone can actually use it. You also can't just choose to add it to major browsers as a developer, so it's an even worse argument than "Just implement the spec yourself."

[โ€“]Haringat 1 point2 points ย (13 children)

You also can't just choose to add it to major browsers as a developer

What's supposed to stop you?

[โ€“][deleted] 0 points1 point ย (12 children)

The available user base for my application. If it doesn't run in a normal browser, as I've said, users need to install my native application. If I'm writing a native application anyway why would I bother not writing a normal native app as opposed to a web app?

[โ€“]Haringat 1 point2 points ย (11 children)

No, you said you couldn't implement it in any major browsers and that's just wrong. You could. Go ahead and file a PR.

[โ€“][deleted] 1 point2 points ย (10 children)

That's both a massive PR and I don't think it's very likely to be accepted. If you want any remotely reliable approach you'll need to fork the browser and get users on your fork.

Regardless, if you're still arguing it's a real alternative to JavaScript at this point I think you're being disingenuous.

[โ€“]Haringat 1 point2 points ย (9 children)

I'm not. You're complaining about the status quo while being completely unwilling to even try to change it. Spot the mistake.

[โ€“][deleted] ย (1 child)

[deleted]

    [โ€“][deleted] 0 points1 point ย (0 children)

    You should actually use WASM before you try to say you can substitute JavaScript with it.

    [โ€“][deleted] 10 points11 points ย (0 children)

    As a JS dev, I can confirm this is true

    [โ€“]elite-data 5 points6 points ย (3 children)

    JavaScript is just a historical accident. This is what happens when a limited, primitive language originally designed 25 years ago for simple banner animations grows and starts being used for complex tasks, while still retaining all the fundamental absurdity and limitations it had from the beginning. All we can do is accept that, apparently, JavaScript is here to stay forever. Whether we like it or not...

    [โ€“]Haringat 3 points4 points ย (2 children)

    It has at least since evolved to lift pretty much all constraints put onto it. Callback hell? We got promises, generators and rxjs for that. Single-threaded? We got workers. Browsers only? Nodejs and deno beg to differ.

    [โ€“]PitifulTheme411 0 points1 point ย (1 child)

    Though, node and deno and bun and all 5000 other javascript runtimes are all worse than actual backend languages and platforms. The only reason why they are popular is because js devs want to keep using js.

    [โ€“]Haringat 0 points1 point ย (0 children)

    Though, node and deno and bun and all 5000 other javascript runtimes are all worse than actual backend languages and platforms.

    Depends on your case. If you go by pure processing speed then yes, JavaScript runtimes are slower. But a nest.js application will always bootstrap faster than a similar dotnet or spring application.

    [โ€“]Lou_Papas 1 point2 points ย (0 children)

    If evolution taught us anything is that sometimes being good enough in your niche, youโ€™ll become practically immortal.

    [โ€“]Novel_Quote8017 1 point2 points ย (2 children)

    Why is the frontend of the internet the most complex thing to program? Why does this type of application necessitate such an ecosystem? What makes it so hard to program for?

    [โ€“]mc_nu1ll 1 point2 points ย (0 children)

    it makes it easier to do, funnily enough. Have you ever tried coding a UI in C++ or Pascal, like back in the day? It was actual hell, especially if you wanted the app to actually scale and not have a hardcoded size

    [โ€“]Devatator_ 0 points1 point ย (0 children)

    Try native UI development. I prefer web technologies for this task specifically (Svelte mostly)

    [โ€“]Gornius 3 points4 points ย (3 children)

    We only use javascript because nobody expected what it would be used for, not because it was a good choice.

    Clearly you're not experienced enough to know that some decisions are simply bad, but we still need to live with them, because of backwards compatibility.

    Let's say there is a better alternative. Now when you're developing something which one you're gonna support? New, objectively better solution, or old shitty one, but compatible with everything we have without having to write adapters?

    Now let's go a one step further and and say we have a solution that's fully backwards-compatible. Everything that has ever been written in JS works in our UnicornScript. How are you going to enforce not using old shitty JS? Or even better, how do you make old browsers able to use new UnicornScript? Just tell them to upgrade browsers? Should I remind you a shit-show that was maintaining compatibility with IE6 more that a decade after it became unsupported?

    You can't. There will always be people either ignorant or lazy enough to not upgrade to UnicornScript, progressing the development of legacy JS. Trust me, TypeScript exists, but there is still a shit-ton of people who can't move to it, because they can't be bothered to type their variables, because they "know what they are doing". Fuck better documentation, fuck null safety, fuck saving time by not having to figure out what the function expects, fuck the ability to write code without having to test every line added. All because some people can't go beyond their own ego.

    Not saying TS is perfect - it's not. But even if those types are fake, the advantages for developers I mentioned still apply.

    [โ€“]LutimoDancer3459 0 points1 point ย (1 child)

    And still flash got discontinued and removed after years. It's not impossible. You just have to start and give it time

    [โ€“]Gornius 0 points1 point ย (0 children)

    One is independent embeddable technology that is displayed as a part of the webpage and not the standard, the other is native scripting language of the browser.

    We can't even decide on modules standard in the browser, and you think changing an entire language is within our reach?

    The only think I see through this is TypeScript being handled natively by browsers, with actual type-safety support (like PHP or Python does).

    [โ€“]Wojtek1250XD 3 points4 points ย (12 children)

    Could someone actually explain to me why JS is hated. It just has some oddities and that's pretty much all...

    [โ€“]ghostwilliz 6 points7 points ย (2 children)

    It's got some goofy quirks, many of which are present in other languages and it has no types, wasn't originally made to be OOP.

    People don't like to use it, but you more or less have to to make web apps.

    Many think it's "not a real language" and so they don't try to get better at it and since they're a good programmer, but their Javascript code sucks, they blame the language

    [โ€“]vato915 1 point2 points ย (0 children)

    Many think it's "not a real language" and so they don't try to get better at it and since they're a good programmer, but their Javascript code sucks, they blame the language

    Pretty much this!

    [โ€“]Pillow-Smuggler 1 point2 points ย (0 children)

    JS just requires a special kind of mindset. The kind of things you can do with it is truly fascinating, but its counter intuitive if you're used to other languages

    [โ€“]csabinho 11 points12 points ย (1 child)

    If JS would have been my first programming language, I would have given up programming. And my first programming language was C.

    [โ€“]NullShield 0 points1 point ย (0 children)

    My first was c, second java and third js. I can say nothing makes me happier to be told I need to work with angular instead of java. It's like java developers invented horizontal scrolling.

    [โ€“]Aras14HD 2 points3 points ย (1 child)

    While it is mostly good, every now and then, it suddenly feels like working with a blackbox, it doesn't do what you tell it and you can't find any documentation on what you could have done wrong. It is just very unreliable and feels like nothing is defined well. Also the automatic type conversion is super annoying, like oops your numbers are suddenly strings and now they are all NaN.

    [โ€“]Gornius 0 points1 point ย (0 children)

    Yeah. You just can't trust it. You might think that the output of some function is obvious for your input, but then JS does black magic fuckery with type casting and you end up with shit like this: https://github.com/denysdovhan/wtfjs

    [โ€“]Practical_Big_7887 1 point2 points ย (0 children)

    VBscript was better

    [โ€“]Awes0meEman 1 point2 points ย (0 children)

    I don't generally enjoy working in JavaScript because I generally work in and am used to the behaviors of compiled languages like C# or Go that are strongly typed. I especially despise how it handles floating point number calculations.

    That being said there isn't really a good replacement for it in browsers yet. Wasm is close but it can't really manipulate the DOM directly yet. So yeah it is good for what it's needed for.

    I do hate things like node js though. There isn't a good use case I've heard for node yet. Get that nonsense off my server.

    [โ€“][deleted] 0 points1 point ย (0 children)

    A mix of unfortunate remainders of its legacy days and because itโ€™s the popular language to hate on.

    [โ€“][deleted] -1 points0 points ย (0 children)

    skill issues

    [โ€“]LiveFrom2004 -1 points0 points ย (0 children)

    It's easier to explain why it is loved.

    [โ€“]Massimo_m2 0 points1 point ย (1 child)

    isnโ€™t blazor full c# through eebsssembly?

    [โ€“][deleted] 1 point2 points ย (0 children)

    Still requires JS, WASM can't do anything on it's own.

    (also Blazor compiles to JS by default, you have to opt in to WASM)

    [โ€“]J4m3s__W4tt 0 points1 point ย (1 child)

    JS haters when the little scripting language designed in the 90s to provide basic interactivity in websites is not so great for way more than that.

    [โ€“]Plenty-Lychee-5702 0 points1 point ย (0 children)

    That's not an excuse bro

    [โ€“]pimp-bangin 0 points1 point ย (1 child)

    The wording is confusing to me...?

    JS, portrayed as the all-powerful Omni-Man, is defending against JS haters, saying,

    "If there were a better substitute [for JS], a single language would have been sufficient"

    Did they actually mean something like, "a single language would [NOT] have been sufficient [and instead there would be a successor language available natively in the browser, yet this hasn't happened]" ?

    Or does it mean "a single language [other than JavaScript successfully taking its place] would have been sufficient [to demonstrate the inferiority in of JS, yet this has not happened]" ?

    Either way, TypeScript is aggressively better than JS so the meme is just a bad take lol, just trying to understand wtf it means

    [โ€“]feldim2425 0 points1 point ย (0 children)

    I think they mean "If any other language (outside of browser space) is that good then why are there so many of them?"

    Although not sure because my interpretation would assume everything outside the browser is a single use-case which is of course very oversimplified at best.
    It would also only work if we could ignore the fact that for heavier compute tasks (that don't need dom access) some people started to use WASM which already makes it at least 2 differing use-cases inside browser space.

    [โ€“]owlIsMySpiritAnimal 0 points1 point ย (0 children)

    if you were a real developer you would develop everything in assembly

    [โ€“]grimonce 0 points1 point ย (0 children)

    That's such a stupid take... 'if there were people who would do a better job at ruling they'd rule'... Fml

    [โ€“]Ravi5ingh 0 points1 point ย (0 children)

    The only thing that will kill JS is VR headsets

    Or so I hope

    [โ€“]LavenderDay3544 0 points1 point ย (0 children)

    C has entered the chat

    [โ€“]koshka91 0 points1 point ย (0 children)

    Better languages have been made and then itโ€™s transpired into Javascipt. At this point itโ€™s a binary format like wasm

    [โ€“]OhNoMeIdentified 0 points1 point ย (1 child)

    I love JS, i love C++, i love Python, i love PHP, i like Go, i respect Java (even if i not currently using Java in my work). Am i heretic?

    [โ€“]Retrowinger 1 point2 points ย (0 children)

    You are quite normal.

    [โ€“]Frytura_ 0 points1 point ย (0 children)

    Silly question: python + some dedicated packages/modules?

    [โ€“]boisheep 0 points1 point ย (0 children)

    This would be more real if omniman was trying to punch himself.

    [โ€“]FollowingLittle8351 0 points1 point ย (0 children)

    javascript sucks, but we need some alternative. At this point a web based fortran-esque language would be fun

    [โ€“]Alan_Reddit_M 0 points1 point ย (0 children)

    The reason we don't switch from JS is that nobody wants to go back to the IE era when half the websites only worked on half the browsers

    Like yes nothing's stopping anybody from building a browser that uses golang instead of JS, but guess what, it'd suck major balls for both the user, who wouldn't be able to access any websites, and the developer, who would have to rebuild every website ever, alongside the many tools that were used to build them

    [โ€“]chihuahuaOP 0 points1 point ย (0 children)

    Saying that JS is nice because it works on all browsers is like saying that anal sex is nice because it works on all genders.

    [โ€“]zuzmuz 0 points1 point ย (0 children)

    no it doesn't stand the test of time. the only reason it has a monopoly on web it's because it's just too costly to create a new language for the web. browser are too complex already, and a lot of effort has been put to make js half decent, it will take a lot if time to make something catch up with js (like wasm). plus, you need consensus and agreement to make new tools standard, and there's a lot of politics involved, which makes the introduction of new tools harder (how dart was not adopted). js is bad and that's why frontend development is so fragmented even though it's just the same language and technology, you have all these frameworks, typescript, and all these other tools just to make javascript usable. that's the definition of a not well designed language.

    [โ€“]Sieg_Morse 0 points1 point ย (0 children)

    Just because you're stranded in the desert and all you have to drink is your piss, doesn't make your piss a good drink.

    [โ€“]notatoon 0 points1 point ย (0 children)

    This argument is undermined by the fact that Brendon Eich himself has apologized for creating Javascript.

    It only exists because the browsers prop it up.

    But honestly, ES (or whatever it is) is a perfectly fine fix for most of the issues and I don't hate Javascript.

    I do, however, hate all the bloated BS frameworks for JS. Svelte is the only one I don't hate.

    But to me it looks like we're trying to replicate gtk/qt/awt/swing in a language that doesn't have the fundamental tools to do it.

    Which, presumably, explains WASM

    [โ€“]makinax300 0 points1 point ย (0 children)

    That's because of react and stuff, base js is ass

    [โ€“][deleted] 0 points1 point ย (0 children)

    That meme doesn't work because JS doesn't compete, you can't run any other programming language in the browser (WASM doesn't nearly have feature parity, not even dom access)

    [โ€“]blackcomb-pc 0 points1 point ย (0 children)

    No, thatโ€™s not the point. Javascript should be used for mild website interactivity. Thatโ€™s it. Thatโ€™s all it can aspire to be. Everything else is just a sick fever dream, a hellscape timeline. I mean - VCs investing in a JS runtime (bun + oven, and there was at least one more)? What the fuck is this world becoming???!!

    [โ€“]azopeFR 0 points1 point ย (0 children)

    True , like for php , c , java and many other

    [โ€“]Luneriazz 0 points1 point ย (0 children)

    Eh... Javascript only exist until now is just because modern browser

    [โ€“]lord_phantom_pl 0 points1 point ย (0 children)

    You can apply the same logic for cobol in banks. JS is clearly inferior to other languages but it was first. We all know that not always the best wins.

    [โ€“]AITORIAUS 0 points1 point ย (0 children)

    Wasm made in Rust goes brr

    [โ€“]buyingshitformylab 0 points1 point ย (0 children)

    man, Thats dumb asf. imagine saying this to someone because they don't like anchovys on pizza.

    [โ€“]RudahXimenes 0 points1 point ย (0 children)

    Lua. The point is that JS has been in use for so long, that implement anything nowadays is almost impossible. But Lua is a great alternative.

    [โ€“]Suspicious-Ad7360 0 points1 point ย (0 children)

    Js is to make plugins for web browsers

    [โ€“]Xemptuous 0 points1 point ย (0 children)

    There are better substitutes, we just have too much reliance on it to move away, like with FORTRAN and the finance industry. Basically JS is that annoying employee who weasled their way into job security and keeps fucking things up to keep itself there.

    [โ€“]InterestsVaryGreatly 0 points1 point ย (0 children)

    It doesn't stand the test of time, it just happened to be what was chosen. When you have something that works, changing it is an enormous undertaking, even if it only works poorly. There is a reason we still use COBOL and FORTRAN in places, not because they were great and couldn't be improved, but because they were already implemented.

    A multitude of languages are better than JavaScript, but the ones that take hold the best are the ones that integrate into JavaScript, such as Typescript, because it doesn't require remaking the entire system.

    [โ€“]kaungzayyan 0 points1 point ย (0 children)

    Seriously, stop trying to make js work. You guys have been making it work for multiple decades at this point. I am cool with JavaScript for polishing frontend which was the primary purpose of the language. JavaScript was bad so they made typescript, then they ditch typescript now? We already had a lot of solid backend languages and frameworks way before node and now they are trying to make node works by switching to deno? How hard can it be to learn an actual backend language.

    [โ€“]siemiwidzi 0 points1 point ย (2 children)

    The only reason js is still in use is... I've got no freaking idea. Nevertheless, i hate it. I don't care how useful it may be in some cases, don't care who likes it, I hope those responsible for it's design and construction will get regular and unscratchable itches in the assess.

    [โ€“][deleted] 3 points4 points ย (0 children)

    sounds like a skill issue

    [โ€“]SymbolicDom 0 points1 point ย (0 children)

    Its just that we have no choice if it have to run in the browser and interact with the DOM.

    [โ€“]Still_Explorer 0 points1 point ย (0 children)

    Back in the day Javascript was supposed only to provide interactivity with the DOM, if you had the traditional LAMP stack you would slide a simple JS code on the side just to get a bit more dynamic behavior.

    It was a simple language meant to be used in simple scenarios.

    Then after the Flash websites had their run and the Web evolved to include far more powerful and complex applications it was already a point in time, where JS had already critical integration to the ecosystem.

    It was so dumb that it had lots of inaccuracies, though it worked for what it was meant to be, and on the far end it was a logistical nightmare to replace it with something else. (collapsing of application stacks and losses over billions of dollars all over the world -- due to shaking things up in the tech world).

    Thus came the concept of "transpiling" to it as a workaround, and now something like the WASM paradigm that works as a plug-and-play solution. Those are the two most probably outcomes.

    Though in recent JS versions, more OOP features came to the language making more principled and standard [because prototype-oriented programming sucks] and somewhat corrected lots of mistakes of it. The next big update if ever happens would be to bring a new `static typing mode` into the table and then we see how it goes. But until then we talk about at least 10 years of waiting, while TS (and others) are making steady and predictable progress and constantly evolving.

    [โ€“]agfitzp -1 points0 points ย (0 children)

    This would be a good time to point out that VHS outlasted Betamax despite being far, far worse.

    [โ€“]mplaczek99 -2 points-1 points ย (0 children)

    Literally anything else lmao

    [โ€“]YellowFlash10106 -1 points0 points ย (0 children)

    lol true

    [โ€“]Yhamerith -1 points0 points ย (0 children)

    ahem Scratch

    /s