|
|
|
|
|
by vanderZwan
2694 days ago
|
|
Honest question: pointing out programming design warts that allow for WAT-level code[0] is perfectly valid, and I obviously prefer elegantly designed languages. Having said that, how realistic are the odds of being bitten by these issues when using CoffeeScript? Also, if our point of comparison is Lua and MoonScript, how do those compare? EDIT: regarding TypeScript and PureScript, can those be compiled in the browser? By which I mean, I'm sure they can technically but do not-too-heavy implementations of such exist? [0] https://www.destroyallsoftware.com/talks/wat |
|
In my experience, minimal if you know the language well and can work around its quirks. Having said that, I prefer working with a language that doesn't require much time to tame and let me do concrete work, at the same time holding my hand when necessary (because of time schedule and pressure and so on). This is less of an issue with private projects, but still there are no downsides in learning a tool that is great for both lone and team work, so there is no real benefit in using coffeescript when there are much more solid languages that compiles to Javascript out there. Hell even heard you can change Glasgow backend compiler to make haskell output Javascript haha
I can't answer about lua and moonscript, I'm completely unfamiliar with them.
About typescript and purescript being compiled in browser, I have never even looked into such approach, they feel unrealistic, because from the top of my head it would require a compilation tool written in JS, which is not particularly efficient for this kind of task that benefits from parallelization, specially if you are not doing deep checks, just translating code. Then there is the matter of what to do with the resulting code. Can we dump it into a file and load it programatticaly? I would be surprised if we could. Eval() the output? Not without some serious security checks that would further compromise performance.
So I believe there is no motivation in not pre-compiling and distributing the result dist code