Lebowski.Social
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
LinearArray@programming.dev to Programmer Humor@programming.devEnglish · 1 year ago

Typescript

programming.dev

message-square
18
link
fedilink
122

Typescript

programming.dev

LinearArray@programming.dev to Programmer Humor@programming.devEnglish · 1 year ago
message-square
18
link
fedilink
alert-triangle
You must log in or register to comment.
  • Limeey@lemmy.world
    link
    fedilink
    English
    arrow-up
    102
    arrow-down
    3
    ·
    1 year ago

    If compiled languages bother you, then you’re gonna love assembly.

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

      Asm is compiled too.

      Gotta bust out the hex editor.

      • Shareni@programming.dev
        link
        fedilink
        arrow-up
        19
        ·
        1 year ago

        Nah, just get butterflies

      • frezik@midwest.social
        link
        fedilink
        arrow-up
        8
        arrow-down
        1
        ·
        edit-2
        1 year ago

        An assembler doesn’t have any of the interesting parts of a compiler.

        Anyway, the problem with Typescript is that it tends to obscure what’s going on one layer below it in ways that don’t happen in traditional compiled languages. We’ve had decades of development on tools that can work together with traditional compilers. Javascript has not, and there are frequent problems getting different tools at different layers of abstraction to march the same direction.

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

        You can write asm in hex too https://grantmestrength.github.io/RetroComputerInstructionManual/intel8080.html just instead of instruction, write opcode https://dercuano.github.io/notes/8080-opcode-map.html#addtoc_2 https://www.pastraiser.com/cpu/i8080/i8080_opcodes.html https://en.m.wikipedia.org/wiki/X86_instruction_listings

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

      I’d rather read ASM than … that random crap.

  • Rikudou_Sage@lemmings.world
    link
    fedilink
    English
    arrow-up
    63
    arrow-down
    1
    ·
    1 year ago

    That looks like a minified webpack (or something similar) output, not a transpiled typescript output. Also the code is not valid.

  • Admiral Patrick@dubvee.org
    link
    fedilink
    English
    arrow-up
    44
    ·
    1 year ago

    You should see what scary C code turns into (shudders)

    • Something Burger 🍔@jlai.lu
      link
      fedilink
      arrow-up
      6
      ·
      1 year ago

      I looked at it once and was scared for my life. I can’t imagine what it would look like once compiled.

  • Excel@lemmy.megumin.org
    link
    fedilink
    arrow-up
    29
    arrow-down
    2
    ·
    1 year ago

    What this shows is how terrible raw JS is, when all of this crap is required to fix all of the edge cases and make things actually work the way it’s supposed to.

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

      It only looks like this if you want compression and backwards compatibility. All compiled languages have output that is optimized for those things and not readability, but if you turn off minification and use a modern language target then the compiled typescript code will look almost identical to the original code.

  • demesisx@infosec.pub
    link
    fedilink
    English
    arrow-up
    24
    arrow-down
    1
    ·
    1 year ago

    I vastly prefer Purescript despite it being the road less traveled. Typescript is just a fake-ish type system on top of JavaScript. But Purescript goes MUCH further in the mission of purity and code safety.

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

      Purescript is like a modern Haskell. Completely different programming paradigm, much less accessible to your average JS developer just wanting to tighten up their code without having to learn category theory

      • demesisx@infosec.pub
        link
        fedilink
        English
        arrow-up
        10
        arrow-down
        1
        ·
        edit-2
        1 year ago

        I’m no white beard, I don’t know much or really any deep category theory (which is, by the way, just some fancy names for stuff we do CONSTANTLY as software engineers), and I use it every single day. Suit yourself, though.

  • moosetwin@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 year ago

    image source

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

    Idk man. I use python ;)

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

    Typescript is verbose training wheels for JavaScript, change my mind

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

      All higher level programming languages are training wheels for programming

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 3.8K users / day
  • 6.2K users / week
  • 9.82K users / month
  • 18.4K users / 6 months
  • 1 local subscriber
  • 23.8K subscribers
  • 1.46K Posts
  • 49.7K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org