Re:JavaScript Structs
by conartist6 on Friday October 11, 2024 @10:21AM
(#41809708)
"let" is one of the good parts. Just don't use const or var.
[ Parent
| on HN ]
Re:JavaScript Structs
by yakshaving_jgt on Friday October 11, 2024 @10:38AM
(#41809862)
Why is it? Why is block scoping useful?
Re:JavaScript Structs
by colejohnson66 on Friday October 11, 2024 @03:13PM
(#41812554)
Because it's how almost every C-syntax-like language works. JavaScript is the odd one out.
Re:JavaScript Structs
by yakshaving_jgt on Friday October 11, 2024 @03:19PM
(#41812613)
I’d prefer to just embrace it. Keep the language small. Prototypical inheritance works just fine. There’s enough in The Good Parts to get all the work done.