Remix.run Logo
paulddraper 9 hours ago

> When someone says "write it in POSIX shell for portability," they mean well.

> POSIX is a specification. Not a program. The thing that actually runs your script is bash, dash, ash, ksh, yash, or one of a dozen others.

“When someone says ‘write it in ECMAScript,’ they mean well.

“ECMAScript is specification. Not a program. The thing that actually runs your script is Node.js, Bun, Deno, Rhino, or one of a dozen others.”

See how silly that sounds?

dzaima an hour ago | parent | next [-]

ECMAScript has a pretty massive amount of fully-specified behavior though; the things that differ between those implementations is nearly-entirely limited to fresh additions like `require` or whatever.

The echo thing would be like if ECMAScript allowed stuff like `"123" == 123` to give either 0 or 1; and then indeed many things would probably break if moved across implementations.

C is the closer comparison, and indeed much software that could easily be portable (and might claim it is) often depends on implementation-specific things like 8-bit bytes, 32-bit int, assuming int8_t/etc in stdint.h exist, twos complement (before C23 at least), arithmetic shift right, etc.

gaigalas 8 hours ago | parent | prev [-]

No one says "Let's write ECMAScript for portability". If someone did, I would probably be writing about that too.

hnfong 7 hours ago | parent [-]

Hey guys... I have a wonderful idea.

... Let's write ECMAScript for portability.

gaigalas 6 hours ago | parent [-]

Can you imagine? Using that fancy new gen JavaScript today?

Oh wait, that's exactly babel's headline! It's just so old now that people don't need to say what it does.

Actually funny that the spec drift got solved by polyfills and transpilers.