I know JavaScript is a very special boi but c’mon, you’re embarrassing me in front of the wizards.

  • bitcrafter@programming.dev
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    6 days ago

    The whole reason why an entire instruction was added to ARM to facilitate conversion to integers is because people need integer semantics from their numbers and so the language has to support this efficiently. Thus, in practice there already two number types, it’s just that they have been merged together in this incredibly messy way so that you have the worst of both worlds.

    • arty@feddit.org
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      6
      ·
      5 days ago

      JS just implicitly does what you, typed language developer, would have to do explicitly

      • lad@programming.dev
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        1
        ·
        5 days ago

        JS just implicitly does what

        …it wants, also sometimes it’s far from what you want or even could expect