• raspberriesareyummy@lemmy.world
    link
    fedilink
    arrow-up
    4
    arrow-down
    2
    ·
    3 days ago

    Also, you contradicted yourself just then and there. Not a single of your examples does string concatenation for these types. It’s only JS

    • bss03@infosec.pub
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 days ago
      • In https://lemm.ee/comment/20947041 they claimed “implicit type coercion” and showed many examples; they did NOT claim “string concatenation”.
      • However, that was in reply to https://lemmy.world/comment/17473361 which was talking about “implicit conversion to string” which is a specific type of “implicit type coercion”; NONE of the examples given involved a conversion to string.
      • But also, that was in reply to https://lemm.ee/comment/20939144 which only mentions “implicit type coercion” in general.

      So, I think probably everyone in the thread is “correct”, but you are actually talking past one another.

      I think the JS behavior is a bad design choice, but it is well documented and consistent across implementations.

      • raspberriesareyummy@lemmy.world
        link
        fedilink
        arrow-up
        1
        arrow-down
        2
        ·
        2 days ago

        Read the thread again, it seems you slipped somewhere. This was all about the claim that implicit conversion to string somehow could make sense.