![]() ![]() I mean, many times you're forced to end a line with a backslash in order to continue it, and even the existence of that necessary feature isn't mentioned once in the docs.īut a lot of people seem to love the syntax, and that seems to outweigh the negatives for them. I personally am slower to code in CoffeeScript, because I know JavaScript 100% inside and out, but with CoffeeScript that isn't really possible, because so much of its implementation is undocumented. ![]() ![]() A significant JavaScript feature, completely gone. Another example: CoffeeScript gets rid of function hoisting. So CoffeeScript isn't just a wrapper around JavaScript, but it really changes its behavior. ![]() If you're using $.each(), and your function's last line is something that returns false (like a separate function you call), then your $.each() loop will terminate unexpectedly early, since jQuery does that when it receives a false. For example, functions return the last evaluated value by default. This is the first language I've ever used where the syntax rules are essentially unknowable, and a lot of time gets wasted trying to discover them through trial and error.Ģ. Unfortunately, there's no way for me to learn how to write parseable code without constantly pasting into the site, and seeing if CoffeeScript understands it or not. Because there are basically no more braces and parentheses, CoffeeScript just tries to guess what you're doing, as far as I can tell, based on a bunch of internal heuristics. Complete lack of documentation for syntax. Putting syntactic sugar aside, while some things are very welcome (list comprehensions, =, ?), there are two main reasons why I would be wary of using CoffeeScript again:ġ. Where I work, we moved the project I work on to CoffeeScript about a year ago, and I've been using it ever since. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |