fucking gross. absolute shitters

EDIT: it's at the right end of the URL bar

  • synesthesia [they/them]
    ·
    3 years ago

    What does it matter if it performs well or not, when it doesn't even have separate types for an integer and a float.

    • skeletorsass [she/her]
      ·
      3 years ago

      I do not like it as a design choice, but there are many languages with a dynamic number type like this, and it does not matter for most use of the language.

      • synesthesia [they/them]
        ·
        3 years ago

        That's true, but it does matter for medical equipment, which the op mentioned.

      • synesthesia [they/them]
        ·
        3 years ago

        Ironically, it is heavily optimized in spite of this. For example, JS arrays are sparse, but runtimes like V8 optimize them to be packed, if possible (if the array contains only integer indices and no holes). Integers also stay integers, if the runtime is fairly confident that they won't suddenly become floats. Moreover, if the runtime finds out that some JS objects don't change their shape (i.e. have the same properties and their inferred types), their relative addresses are cached, so the runtime doesn't need to look them up every single time.