3 ms·
> does nothing to address the things that I hate about writing JavaScript (oh, the weakly-typed type system for one thing It can't because it's actually JS, by
by lloeki 13y ago
> does nothing to address the things that I hate about writing JavaScript (oh, the weakly-typed type system for one thing
It can't because it's actually JS, by design. Yet it dutifully tries as hard as it can within this design goal by e.g making its == compile to JS ===. Maybe you'd rather be interested in ClojureScript or Dart, which use JS merely as a VM instead of their systemic core.
> If a front-ender on my team started using CoffeeScript on a project I work on, I'd take him to one side and say "it's fine to practice weird kinks in private, but compile it into JavaScript before you check it in". :)
If a back-ender[0] were to come to me-as-a-front-ender (since I'm equally both), and tell me what language to use, I'd tell him to, well, mind his own server-side business and let front-enders use whatever language they deem able to make them go from A to B in the most clean, reliable, and efficient way possible to them, or else I'll make them rewrite their stuff in NodeJS under cover of both ends being able share and reuse code, just to make them suffer ;-)
[0]: which I don't know if you are or not, but given the substance of your comment, I'd venture mostly the former.
- masswerk 13y ago> Yet it dutifully tries as hard as it can within this design goal by e.g making its == compile to JS ===. Now we're effectively losing the "==" operator, which is behaving like in most other traditional scripting languages (e.g. Perl). What did we win by losing an operator? Why obfuscate that this is not the JS "==" operator but most likely the "===" operator?
- lloeki 13y agoEither one wants weak typing or strong typing, but one cannot have both. "most other traditional scripting languages" consists of Perl and PHP (not even (ba)sh/test, to which == is string comparison whereas -eq is integer comparison), while languages typically used on the backend together with JS/CS include Python, Ruby, Java, C#, and whatnot, none of which have such an error-prone feature. > What did we win by losing an operator? Why obfuscate? Type safety, and resistance against both bona fide errors and clueless developers. Sane defaults matter.