Hacker News new | ask | show | jobs
by cbebdhhd 3641 days ago
Could you pretty, pretty please allow for an option to have automatic parentheses insertion, similar to how javascript will insert semicolons, making them optional? This is almost exactly the language that I've been planning for the last six months, and if you would be so kind as to implement that one feature, it would save me a lot of reinventing the wheel.

I was originally envisioning having the compiler being able to infer parentheses based on code indentation.

Also have you considered compile time AST evaluation and simplification?

3 comments

If it takes off, and fulfills all peoples' dreams and brings rainbow-farting pink ponies to Earth, then I suppose there might come lots of parser butchering by people and fitting it to their likes via forks/frontends - me, for example, I'd love it to look more Rebol-like ;)
Maybe you can use "Readable Lisp S-expressions".

http://readable.sourceforge.net/

If you don't want the parenthesis then why not use reverse polish notation?
unless you're thinking of something that I'm not thinking of? RPN only solves this when the operators are known and used exclusively in operator context and can be relied on as implied close-parens