3

What can I use instead of JavaScript? From what I’m reading this language seems like self harm, and I’m not a masochist.

Comments
  • 3
    Like anything you want. Languages are chosen by technical constraints. Not dubious opinions of suckyness. Javascript is mostly the only game in town for web. That is changing though.
  • 2
    0. Get flat assembler.

    1. Binary mode.

    2. Use macros to output JavaScript.

    3. Profit.
  • 3
    anything that compiles to wasm I guess

    that might be more pain than JavaScript tho
  • 1
    @jestdotty I lost interest in wasm when I saw there was no threading. Or threading had poor support.
  • 1
    A lot of things have been fixed over the years, haters are still stuck with a es5/jQuery mindset
    Just use TypeScript and modern practices and it's fine
  • 1
    What do you want to do?
  • 0
    @Demolishun Cross-thread communication has no place in any sandbox, because CPU manufacturers fucked us so hard that not only is Assembly unsafe but any abstraction that recognizes the passing of time in any way inherits the plague.
  • 0
    I wonder if a language could be designed that's built from the ground up to be unusable for a cache timing attack. It might consist of small blocks of code of defined runtime which pretend to be instantaneous, separated by waits which are unpredictable and long.
  • 1
    @Demolishun > "I lost interest in wasm when I saw there was no threading"

    Have you checked out the WASM+threading in .net 8?

    Curious, what kind of web app are you writing that needs multi-threading capability?
  • 0
    @PaperTrail I wanted to compile a Qt C++ app that uses threading. Support was not good for threading. So I lost interest.
  • 1
    Run away! The front end is always a shitshow!
  • 2
    @Demolishun WASM isn't an emulator, it's a platform. For now it's best for greenfield projects, but even when it matures it would still provide unique implementations of things like threading with unique restrictions, so you will never be able to just run a desktop app, like currently you can't just run a Windows app on Linux.
  • 1
    @lorentz < "WASM isn't an emulator, it's a platform"

    We're going full steam into Blazor (WASM) for internal (web) migrations (Angular, React, and SharePoint). Right now, couldn't be happier.

    TL;DR, my immediate mgr is a C# threading guru and pulled off some impressive async/await magic I'd put up against nearly any React/Angular/etc equivalent implementations.
  • 0
    @PaperTrail Blazor has a green thread implementation I think, which should be identical for almost all purposes except some performance characteristics.
  • 1
    @PaperTrail C# can have nice things because it's an interpreted language with a massive runtime. I guess you could add it to C++ by injecting a yield operation before recursive calls and loop repeats, but the whole language and how its developers think about performance is pretty incompatible with wild shenanigans like that.
  • 0
    you would obviously need a virtual stack, but most languages already use one alongside the native stack when compiling to Webassembly because stackbound references aren't a thing.
Add Comment