3 ms·
You say all this as if JS's jit engines (V8, chakra, spidermokey, etc) did not destroy "better designed" languages when it comes to speed and efficiency. The on
by Sawamara 8y ago
You say all this as if JS's jit engines (V8, chakra, spidermokey, etc) did not destroy "better designed" languages when it comes to speed and efficiency. The only dynamic language that does not pale beyond what is achieved with V8 is LuaJIT.
- ummonk 8y agoHow many "better designed" dynamic languages are there even out there? Julia is one such language and is substantially faster than V8, at least for idiomatic code. The problem is that most dynamic languages (like JS) are never designed with speed and efficiency in mind. JS just happens to be the fastest of that bunch (other than Lua) because browser makers have invested substantial effort into making it fast - far more than anyone has put into other dynamic languages.
- Sawamara 8y agoUsual suspects that many people who hate JS seem to champion are are python, lua, ruby. I love Lua personally, but it has its own traps too. Never could get into Python too much, the indentation syntax is killing me :P
- arghwhat 8y agoI hate JS with a passion (I worked with it professionally for years, and wrote crypto and compression algorithms, as well as an entire web browser sandbox), but my refuge is in static languages. I no longer see dynamic languages useful for more than bash-like scripting where correctness is uninteresting. :/
- arghwhat 8y agoI don't understand interest in dynamic languages. I have worked with them extensively, but I find them to be handicapped without benefit. However, JS specifically was not designed at all to begin with, but just thrown together, and core concepts have stayed since this first iteration. These core concepts are its primary handicap.
- ummonk 8y agoWell, there are some use-cases where Julia is actually faster than compiled code due to being able to compile dynamically generated code on the fly (see https://discourse.julialang.org/t/julia-vs-fortran-complaint/4366/7 https://discourse.julialang.org/t/julia-vs-fortran-complaint...) But yes, in general the same lack of static guarantees that makes dynamic languages slow also makes code in dynamic languages hard to maintain. I think a lot of programmers tinker with code in dynamic languages and end up liking them as a result, but don't realize the difficulty of working in such a language in a much more complex codebase.
- taeric 8y agoI'm curious what your claim is. The evidence here is primarily that engineering effort can provide massive benefits to runtime speed. This is not that controversial, I believe. It can feel disappointing, but there is no reason for it to. The people working on those engines are putting a ton of solid effort into it. They deserve the recognition they have gotten. This in no way argues against some other languages being better designed for performance. Indeed, many other languages are better designed for performance. The designers should get recognition for the contributions they have made, as well. Again, though, it can sound like disappointment that we can't get both teams working together. I contend that is short sighted. Yes, we can imagine a world where they worked together to make even better things. However, don't let that imagined world stop any communication on the front lines that we have today. (That make sense?)
- arghwhat 8y agoThe performance of JS is purely down to absolute compiler genius, which would have given better results and been better applied to a language that was not designed on the back of a napkin. JS does everything in its power to make life hard for the compiler. Outside JS, most compiler work goes into static languages (which I strongly prefer), but once WebAssembly DOM support comes through, better languages will run on V8, stripping JS of everything it has.
- toopsss 8y ago> JS does everything in its power to make life hard for the compiler. This is a bit hyperbole. It could be worse, it could be python. Yes pypy does not have the investment of v8, but there is more to it than that. Yes js sucks but the language was relatively simple enough to get speedups that would not be possible in jitted python because frankly python is a steaming hodge lodge pile of shit when you take the system as whole (imnsho)