• alokir@lemmy.world
    link
    fedilink
    arrow-up
    41
    arrow-down
    2
    ·
    1 year ago

    The title makes it seem like it’s a wide spread thing in the industry but according to the video it’s 3 frameworks.

    Yeah, it’s additional work but I’ve found that really convoluted or complex type definitions usually mean you should consider refactoring. Of course this is a bit different when it comes to developing frameworks where you might want to support a bunch of different use cases.

    Maybe I’m biased because I’ve been using TS ever since it first came out.

    • jeremyparker@programming.dev
      link
      fedilink
      arrow-up
      8
      arrow-down
      1
      ·
      1 year ago

      And Rich Harris (Svelte) said, it’s an issue for people in his position, aka, people making tools for developers - he fully expects and respects that the end users (developers using those tools) don’t really experience the downsides.

      That said, I feel like we’re seeing a lot of versions of complaints about how big the stacks are getting, how big the foundation is that we “need” just to get started. That desire for minimalism is core to the developer mentality imo, it makes us good at our jobs. I think we’re going to see more paring down and culling in the coming months/years.

  • TheLurker@lemmy.world
    link
    fedilink
    English
    arrow-up
    28
    arrow-down
    10
    ·
    1 year ago

    I think people should watch a few other videos from this person. His channel is satire.

      • TheLurker@lemmy.world
        link
        fedilink
        English
        arrow-up
        9
        arrow-down
        4
        ·
        1 year ago

        Just because something is satire doesn’t mean it is untrue.

        Okay, some of his content could be considered more serious. But the overall aesthetic of the channel is clearly satirical in form.

        • newIdentity@sh.itjust.works
          link
          fedilink
          arrow-up
          4
          arrow-down
          1
          ·
          1 year ago

          Technically correct, but saying this channel is satire sounds like this channel is a parody and this video isn’t meant seriously. It sounds like this channel would do kinda do the same type of content that “Samtime” or “Programmers are also human” does.

          • TheLurker@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            arrow-down
            3
            ·
            1 year ago

            Parody is different to satire.

            Parody is an imitation of another piece of media or work where you are making comedic commentary of that work.

            Satire is using comedy to offer commentary, to carry a message, or to offer criticism about the world.

            Yes, like Programmers are also human. That is satire as well, same as Fireship.

            • newIdentity@sh.itjust.works
              link
              fedilink
              arrow-up
              2
              ·
              1 year ago

              It’s satire, but it’s a different kind of satire. When I hear satire I think of Programmers are also human and his content is completely different than fireship’s.

    • Stephen304@lemmy.ml
      link
      fedilink
      arrow-up
      16
      arrow-down
      1
      ·
      1 year ago

      Imo calling his channel satire for his use of comedy is akin to calling TechLinked satire because of their use of comedic quips, heckler, and goofy quick bits transitions. Satire implies a level of irony or insincerity, which I don’t think code report falls under. His videos might be comedic but the topics covered are serious and factual.

  • T (they/she)@beehaw.org
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    I never met someone that actually used Typescript in a professional setting saying they dislike it. It makes your life easier and you can still have parts of your project using regular JS.

    • cactusupyourbutt@lemmy.world
      link
      fedilink
      arrow-up
      9
      arrow-down
      2
      ·
      1 year ago

      so he does all of this because he dislikes transpiling because supposedly it makes debugging etc harder? does he know about sourcemaps?

      he also says he doesnt like type information in his code, so he adda them as comments. the type information is still there, how is this an improvement?

      • scorpionix@feddit.de
        link
        fedilink
        arrow-up
        5
        arrow-down
        3
        ·
        1 year ago

        The issue with transpiling is that the code that’s running in production is not necessarily the one that’s been tested. A source map doesn’t fix that.

        • atheken@programming.dev
          link
          fedilink
          arrow-up
          6
          arrow-down
          2
          ·
          1 year ago

          I loathe this line of reasoning. It’s like saying “unless you wrote assembly, compiling your code could change what it does.”

          Guess what, the CPU reorders/ellides assembly, too! You can’t trust anything!

          • pivot_root@lemmy.world
            link
            fedilink
            arrow-up
            4
            ·
            edit-2
            1 year ago

            Haha, what is this, the 90s?

            Assembled instructions aren’t even the lowest non-hardware stage in instruction execution. There’s proprietary microcode sitting a level below your typical x86 ISA.

            And even then, what if… God forbid, the hardware has errata…

            • atheken@programming.dev
              link
              fedilink
              English
              arrow-up
              3
              ·
              1 year ago

              🙈🙉🙊

              I know, but I didn’t want to scare the children.

              I also choose to pretend it’s just little gnomes moving the bytes around. Less magic.

          • scorpionix@feddit.de
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            Because Browsers can’t run Typescript, they run JavaScript. That’s why the intermediate conversion step isneededd.

        • pivot_root@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          Unless someone is using some language extensions, transpiling from TS to an ECMAScript module using the ESNext target merely drops the type annotations.

          If not running the exact same code being developed is an issue, it’s an easy fix.

    • iFarmGolems@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      I do this daily and believe me when I say that I’d trade my kidney for the ability to use TS natively. This looks good on paper but jsdoc notation has lots of flaws and you literally can’t do some things with it. Also, it doesn’t check if the function actually does the thing you described so it needs manual review every time it’s changed.

  • ComeSweetDeath@programming.dev
    link
    fedilink
    arrow-up
    2
    arrow-down
    2
    ·
    1 year ago

    good. typescript has always caused us more headache than it worth in all my projects. I bill my clients extra for it if they make me work on it.

  • ChaoticNeutralCzech@feddit.de
    link
    fedilink
    arrow-up
    5
    arrow-down
    39
    ·
    1 year ago

    Opinion from me, a JS beginner: Vanilla is good enough now. If your IDE lets you type common structures like document.getElementById("") with shortcuts, I find no need to use a framework. Also, vanilla works better in offline projects.

    • Nerd02@lemmy.basedcount.com
      link
      fedilink
      English
      arrow-up
      23
      ·
      edit-2
      1 year ago

      How is that related to TS? Aside from the fact that your comment might have just started a civil war (no, vanilla JS is not “good enough”, they created libraries for a reason) this isn’t about using libraries / frameworks. It’s about needing some system to handle type annotations to avoid falling in the bottomless pit of:

      Uncaught TypeError: Cannot read property of undefined

      • ChaoticNeutralCzech@feddit.de
        link
        fedilink
        arrow-up
        1
        arrow-down
        31
        ·
        edit-2
        1 year ago

        I literally don’t know what TypeScript is, lol. But the video says that Vanilla is an alternative to TS and I am a happy user of it. I thought it was some enterprise language that compiles to JavaScript for people who cannot handle document.getElementById("") but will happily add an abstraction layer on the wonky HTML-CSS-JS mess, just to have the compiler create really weird undecipherable minified JS… But I already said I’m inexperienced – don’t take advice from a $ hater whose biggest working website is this.

        • fiah@discuss.tchncs.de
          link
          fedilink
          arrow-up
          26
          ·
          1 year ago

          I literally don’t know what TypeScript is

          then perhaps you should learn about it before you offer your opinion

        • Nerd02@lemmy.basedcount.com
          link
          fedilink
          English
          arrow-up
          15
          ·
          1 year ago

          Then I guess this is what you get for talking about something without knowing what it is lol.

          As another user pointed out, TypeScript is a different language (.ts extension) that extends JavaScript, meaning JS code is valid TS code, but TS adds various language features for type checking. Your editor is then able to interpret your code according to these type structures and warn you if you are making any stupid type errors like this one:

          The problem many people have with TS (such as the “big projects” mentioned by Fireship) is that sometimes you end up having code that works but still have to do some weird type gymnastics to please the TS compiler and have it remove any errors and warnings.

          That being said, frameworks that “create really weird undecipherable minified JS” do have their place, as they allow you to seamlessy do things that would be either very inelegant and verbose or significantly more complex in vanilla JS, but I won’t bore you with an excessively long wall of text.

          PS: I love your Czech flag website. Had me jump on my chair when the music started blasting through my headphones.

        • 520@kbin.social
          link
          fedilink
          arrow-up
          6
          ·
          1 year ago

          Typescript is basically JavaScript with variable typing. That is, you have to explicitly declare that your variable is a string, int, float, etc.

    • atheken@programming.dev
      link
      fedilink
      English
      arrow-up
      23
      ·
      1 year ago

      This is an professional experience thing.

      Types support “programming at scale” - scale in the sense of larger code based or multiple people contributing.

      If you’re hacking away at a script for a web page, then yeah, have at it.

      If you’re supporting more than a few hundreds lines of code or working on a team, you need types to codify and communicate information that can be verified with a compiler.

      Whenever you see a larger codebase that is not strongly (or statically) typed, you generally will see unit tests that are verifying the types/structure of outputs.

      • TehPers@beehaw.org
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        As someone who has written some Python at work, whenever I need to work on some code without type hints, I spend way too much time trying to figure out what all the parameter types should be for functions. I can’t be the only one doing this though, I’ve seen functions that assume their inputs are strings receiving pathlib.Path on some uncommon branch that sure enough errors on some obscure user inputs.

        I’ve been pushing mypy hard though. It’s not perfect, but it works well enough that it’s still worth using over not using. The biggest pushback has actually been from the amount of time we’d have to spend fixing type-related bugs instead of developing new features.

        • luxmesa@lemmy.blahaj.zone
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          I have the same problem. Any time I use a dynamically typed language, whatever time I save not specifying the type, I’ll lose immediately when I have to hunt down what sort of data this function expects or chase down some error that a compiler would have caught in a statically typed language.

    • pjhenry1216@kbin.social
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      The summary uses the term “vanilla JS” in a weird way. It’s just to further denote it’s not TypeScript because TypeScript is a language that essentially extends JavaScript. It’s not a framework. This is about language choice of TS vs JS inside large complex libraries only.

      Libraries tend to have a need for generic typing due to the nature of being code used by other code. So you get a lot of syntax craziness involving Type parameters.

      You can still use the libraries mentioned in a TS project. They’re just not written in TS. TS and JS can be in the same project. Moreover, it even states this isn’t about developers using TS in non-library projects.

    • dbilitated@aussie.zone
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      1 year ago

      it’s fine to learn with. preferable even. I lead a team of devs writing/maintaining four related front-end applications and at a point you really need a better language.