Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: The Earl Grey language – pattern matching, macros, compiles to JS (breuleux.github.io)
5 points by breuleux on Aug 7, 2014 | hide | past | favorite | 1 comment



I just want to preempt one criticism here. The reason why EG uses f{...} for function calls and [...] for grouping instead of parentheses is that it makes for simpler syntax. Conventional languages overload () for arguments and grouping, but it is more consistent to use different brackets for these roles. Since macros and code manipulation are an important part of EG, I figured that syntactic simplicity and consistency trump convention (and I did not want to go full Lisp either). I wrote up the rationale here, for what it is worth: http://breuleux.github.io/earl-grey/repl/?eval=help.brackets

This being said, the fact that parentheses are currently illegal tokens means their role in the future is wide open. I could make them into sugar for the other bracket types, s-expressions, strings, thunks, code literals, or I could put them into userspace so that you can do whatever you want with them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: