News for hackers. Stuff that matters.
Re:Deep Cloning Objects in JavaScript, the Modern Way by laurencerowe on Thursday December 21, 2023 @09:01PM (#38730016)
Pedantically, while _everything_ is an object is true for Python it’s not for JavaScript which has distinct primitive types for strings, numbers, booleans, symbols, and undefined.
Re:Deep Cloning Objects in JavaScript, the Modern Way by jholman on Thursday December 21, 2023 @10:22PM (#38730607)
And null. I know that typeof(null) says 'object', but it's lying. When I say "it's lying", I mean that according to the spec, null is of type null. Also it has absolutely nothing in common with objects except for the output of typeof.

Also these days there's BigInt.

Re:Deep Cloning Objects in JavaScript, the Modern Way by baq on Friday December 22, 2023 @03:19AM (#38732132)
JS is amazing.

As in, it’s amazing that anything actually works given the internal inconsistencies in its core.

(Disclaimer: I code ts/js for a living.)