Remix.run Logo
skrtskrt 10 hours ago

the fact that you can just redefine Map in a script is mind boggling

xigoi 5 hours ago | parent [-]

Why? Being able to redefine anything is table stakes in dynamic languages.

fragmede 2 hours ago | parent | next [-]

You can't assign a value to false, for example, so "anything" isn't everything (Node v22.17.0).

    > false = 4
    false = 4
    ^^^^^
    
    Uncaught SyntaxError: Invalid left-hand side in assignment
Fascinatingly enough though, you can assign a value to NaN. It doesn't stick tho.

    > NaN
    NaN
    > NaN = 42
    42
    > NaN
    NaN
    >
(map behaves as described.)
g947o 2 hours ago | parent | prev [-]

So? Does being able to do something means you should?

xigoi an hour ago | parent [-]

I didn’t say you should. The comment I’m replying to expressed surprise that redefining something is even possible.