Hacker News new | comments | show | ask | jobs | submit login

In defense of CoffeeScript, I'm not convinced that semantic issues like this are at all obvious during the creation of a programming language. Honestly it'd be dumb luck landing on this one in particular since you can imagine that the grammar definition for lambdas and invocation/application aren't sitting right next to each other. That's what got me thinking about how you could explore the term space automatically.

Flaws like this arise from trying to be too clever with syntax. Function application with parentheses, literal regular expressions without clear delimiters, etc. Syntax should be describable in a handful of universal rules. Lisp is the extreme in this regard, the rule is simply: parentheses nest properly. But you can build surprisingly rich syntax with a simple set of rules so long as you lay out those rules first and conform the syntax to them as you go.

Io language is another great example of a language with a minimal set of universal rules yet incredibly rich metaprogramming.


This particular issue was discussed during the design of the function definition and application grammar. (see above comment)

Right, but it's possible that the trade offs inherent in supporting both forms of method/function invocation and how they interact with function literals may not have been obvious to a different person.

Moreover in a different language it seems like it would be exceptionally hard to know how everything will interact, which is where a tool that can help you explore the term space automatically has value.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact