Re:New Date("WTF") – How well do you know JavaScript's Date ...
by const_cast on Saturday July 12, 2025 @04:32PM
(#44544933)
No, it's a proper footgun, same as dereferencing a nullptr in C++. You'll notice that too - doesn't mean it's not a footgun.
And, in fact, most C++ compilers today will actually warn you when you derefernence a nullptr in a stupid, obvious way. Evidently, JS has not caught up to this incredibly sophisticated technology /s.
Re:New Date("WTF") – How well do you know JavaScript's Date ...
by jameshart on Saturday July 12, 2025 @05:57PM
(#44545540)
JS has caught up - it has a sophisticated compilation and linting ecosystem called ‘TypeScript’.
Which at least will tell you you’re using a deprecated API, but won’t overcome the dumb API naming choices JavaScript blindly imported from Java
Re:New Date("WTF") – How well do you know JavaScript's Date ...
by const_cast on Saturday July 12, 2025 @06:09PM
(#44545620)
We've come full circle. The build systems for JS, a scripting language, make C++ compilation look trivial. And, unfortunately, that's reflected in the compile times.
So it’s more like a foot dollar store water gun.