• MyNameIsRichard@lemmy.ml
    link
    fedilink
    arrow-up
    12
    ·
    3 years ago

    When JavaScript was first released, it was a god-send. The alternative was vbscript and if you think JavaScript is bad…

    • lucidwielder@kbin.social
      link
      fedilink
      arrow-up
      4
      ·
      3 years ago

      Very true. I remember vbscript. I still have to write some occasionally. What’s funny is that powershell gets all the attention & security applied to it - but vbscript likely keeps its flaws in the name of backwards compatibility. I’m betting vbscript is a huge attack vector just waiting for some major exploitation that leads to its removal or being severely gimped.

        • allywilson@sopuli.xyz
          link
          fedilink
          arrow-up
          3
          ·
          3 years ago

          Correct. You know how JavaScript is not Java? Same thing. If memory serves me correctly there was a bit of a race to be the next Windows script language between NT4 and 2000 (to replace batch), and it was between VBScript and Kixtart (the former won out).

        • MajorHavoc@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          3 years ago

          Correct.

          To get a feel for what VBScript was like, think of Visual Basic. Now throw out all the good bits and mix in a bunch of JavaScript style quirks.

          Then try to parse binary data packets with it, beacuse XML isn’t widely supported and JSON has not been invented/discovered yet.

          It was bad.

        • andrew@lemmy.stuart.fun
          link
          fedilink
          arrow-up
          1
          ·
          3 years ago

          option base 42

          Sadly, per the syntax docs on O’Reilly it doesn’t look like it can be anything but 0 or 1. That’s not to say it’s a good feature, but at least make it fun if it’s gonna be bad.

      • MajorHavoc@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        3 years ago

        That’s such a perfect summary of VBScript. Starting array indexes at 1 was it’s vibe.

        VBScript would show up for it’s first day as a construction worker in a white shirt and a tie. I loved VBScripts willingness to do messy work, but boy was it unprepared in many contexts.

  • fibojoly@sh.itjust.works
    link
    fedilink
    arrow-up
    6
    ·
    3 years ago

    Kids complaining about JavaScript while I’m at work, looking at fucking COBOL, or trying to maintain C# exe that were written by somebody who clearly did not understand OOP yet underlie the entire tool chain of a 3k+ employees company.

    Oh and go check out the “natural language” syntax of Macromedia Director scripting (Lingo), for your edification…

    Languages are tools. Some of them are really shitty tools, for sure, but if you think JS is it, you haven’t seen anything.

    • flashgnash@lemm.ee
      link
      fedilink
      arrow-up
      2
      ·
      3 years ago

      JS isn’t that bad provided you just use it for frontend UI, it’s quite good at that

  • Pfnic@feddit.ch
    link
    fedilink
    arrow-up
    5
    ·
    3 years ago

    I get why JavaScript can be terrible but at least there’s TypeScript. I’d argue Python suffers from the same problems but hasn’t got anything comparable to TS for keeping types in check and can’t autoformat well because whitespace is syntactically meaningful. In that way I think Python is worse to write maintainable code with.

  • ExistensialDread@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    3 years ago

    a lot of its quirks really do start to make sense when the whole language was essentially designed in about a weekend. a lot of my own weekend code still haunts me to this day

  • palordrolap@kbin.social
    link
    fedilink
    arrow-up
    3
    ·
    3 years ago

    In 1994, CGI back-ends were the closest thing to interactivity in the browser, and that’s far back enough that a good deal of it was written in C. Strong typing abounds!

    But JavaScript was an absolute joy by comparison. Heck, even Perl CGI was a joy compared to having to write executables for every fricking thing.

    Note that by JavaScript, I mean the mostly hand-crafted stuff in earlier sites, not the enormous frameworks that are in use these days.

    • fibojoly@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      ·
      3 years ago

      Hear, hear! In 1998, I did my work experience at a local ISP and was tasked with coding a backend that would create accounts for people wanting to buy an internet subscription from us.
      IIS was still in beta so my boss decided I would use Linux, this new fangled language called PHP and just write a CGI in C that would do the actual creation of accounts on our server (IIRC).
      I spent a few weeks on a console terminal, using vi, doing C; which was as abominable as one might expect. PHP was fucking magic, in comparison. And on the front-end, I used a bit of JavaScript to add some interaction and reactivity and that was just fun!

      Heck, seventeen years later and I still think it’s a fun language to use.

      Anyway I don’t know where in was going with this… you kids don’t know how good you have it, is what I’m saying.

  • I use NixOS btw @lemmy.world
    link
    fedilink
    arrow-up
    5
    arrow-down
    2
    ·
    3 years ago

    I hate all these “hurr durr javascript bad” posts. It’s really not so bad, and worse languages exist. It’s really just a bad, overused joke.

    • CanadaPlus@lemmy.sdf.org
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      3 years ago

      It’s really not so bad, and worse languages exist.

      Esoteric languages do not count. Super obsolete ones don’t either. At that point you’re left with maybe PHP.

      It’s really just a bad, overused joke.

      Now that might be true. I guess the main counterpoint is that it’s not like you never encounter it, so it’s natural it gets joked about a lot.

    • Gork@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      3 years ago

      The best languages allow you to program not just emojis as outputs, but with emojis themselves. 🫳⌨️🖥️

    • alokir@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      3 years ago

      I’d bet that most people who think this way either haven’t used it in the last 10 years or they only know it from the memes.

      • whatsarefoogee@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        3 years ago

        Nope. Use it very often, though mostly usually with typescript.

        Raw Javascript becomes a massive hindrance in any project past half a dozen files and 1000 lines.

        Typescript makes it a lot more usable.

  • MajorHavoc@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    3 years ago

    In this thread: A lot of developers who don’t understand that my burning hatred of VBScript, and JavaScript’s subsequent redemption of my sanity - do not combine to cause me any less bunring hatred toward JavaScript.

    Yes, the meme is objextively false. I was there, and none of us dressed that well.

    Cliff notes for any newbies trying to navigate what to think of all this:

    • VBScript was deeply flawed.
    • JavaScript is deeply flawed.
    • TypeScript exists for a bunch of really good reasons.
    • Old programmers only bitch about new technology and old technology.
    • To get as much hate at JavaScript gets, it has to be useful. JavaScript is incredibly useful.
  • dark_stang@beehaw.org
    link
    fedilink
    arrow-up
    1
    ·
    3 years ago

    I love javascript and how loosey goosey it is, I must be the odd one out. Then again my apps tend to be database driven so it’s mostly just a UI and very thin API layer.

    • argv_minus_one@beehaw.org
      link
      fedilink
      arrow-up
      6
      ·
      3 years ago

      There are plenty of things wrong with the tool itself.

      For example, there is no way to define an equality and hash function for a class, so there is no sensible way to use arbitrary data structures as Map keys.

  • candyman337@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    3 years ago

    Js is what you make of it. It can be a godawful mess but it also can be really awesome. It’s a really easy language to understand, that is a good thing. But it’s also a double edged sword because that means that novices can write absolute spaghetti code in it. That’s not the fault of the language though.

    • chaorace@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 years ago

      Js is what you make of it. It can be a godawful mess but it also can be really awesome.

      Agreed. It wasn’t always a great language, but by some miracle it eventually became pretty alright.

      But it’s also a double edged sword because that means that novices can write absolute spaghetti code in it. That’s not the fault of the language though.

      Disagree. The best languages are those which can be intuitively used without having to learn the pitfalls. Take Rust vs. C++, for example: both languages have pitfalls, but only Rust is intentionally designed to help you steer clear of them. JS is like C++ in this regard – decades of cruft have coalesced into tempting yet painful footguns, much to the chagrin of many a new learner.

    • Cethin@lemmy.zip
      link
      fedilink
      arrow-up
      0
      arrow-down
      2
      ·
      3 years ago

      Except nit having strict types makes it harder to read, not easier. You have to try to remember what type of data each object contains. Strict typing makes it easier to read. JS is slightly easy to write though, for better or worse, although usually harder to come back to for the same reason mentioned earlier.