3 ms·
The compiler looks like JavaScript and behaves like JavaScript but it’s optimized; to me asking for React to add more random non-JS keywords to their compiler J
by jitl 2y ago
The compiler looks like JavaScript and behaves like JavaScript but it’s optimized; to me asking for React to add more random non-JS keywords to their compiler JS syntax is like asking that you add more keywords to C functions to allow you to build with -O3
- pavlov 2y agoCorrect use of hooks isn’t an optimization, it’s a necessity to make your programs work. Your position is more like saying: “Why does C++ need special syntax for initializers? Surely you can just use alloca() to grab a variable-sized blob of bytes from the stack and cast it to whatever types you’re initializing.”