4 ms·
He honestly lost me when he said he couldn't understand how this works in JavaScript. Also, what is meant by Google scale? Do real people really go around choo
by iamleppert 9y ago
He honestly lost me when he said he couldn't understand how this works in JavaScript.
Also, what is meant by Google scale? Do real people really go around choosing a language for a project thinking "gee, if I ever get to the size of Google I'll sure be glad I choose BuckleScript!"
Also, what is meant by an optimizing compiler? The optimizations are done by V8. Any possible pure language optimization you could be doing likely isn't worth it at all.
It's also not correct to say there's no JS legacy. There will be a legacy the first time you need to look at any of the generated JavaScript code.
Next, who wants to build a code base using a language that's hard to learn and come up to speed in? If the entire point is net productivity, you better be able to offset all that upfront costs by demonstrative gains elsewhere. Of course, no one will ever measure stuff like it and it will be very subjective and vary per person.
- Sawamara 9y agoYou should have just seen how the compiler works. There are examples on the side. For example: an {a,b} struct is compiled down to a [a,b] array in JS. (by the compiler). This is an optimization. V8 can only optimize the code that it is given (and sometimes, deoptimize). The better your code is, the more easier V8 can optimize it.
- romanovcode 9y agoOptimising compiler part means: // Unoptimised let x = 10; console.log(x); // Optimised console.log(10); I completely agree with all the other points you made tho.