[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Are we done? Are other changes needed to maximize adoption?

This page is part of the web mail archives of SRFI 105 from before July 7th, 2015. The new archives for SRFI 105 contain all messages, not just those from before July 7th, 2015.

Per Bothner:
> You might find this interesting:
> http://per.bothner.com/blog/2010/Q2-extensible-syntax/

Thanks for the pointer!

This has somewhat similar goals to the "readable" project, though with a different approach.  The big difference is that I decided it was important to have a generic notation for *any* s-expression.  It's probably fairest to compare Q2 to the "sweet-expression" notation:
* Sweet-expressions have infix, though not precedence.  Actually, precedence *could* be added, as discussed in SRFI-105... I just don't think it's worth it.
* Both have "juxtaposition for function application"
* Q2 has "Naming a zero-argument function applies it" but this is awkward, indeed, "The exact rule for a distinguishing between a variable reference and a zero-argument function application isn't decided yet." In sweet-expressions, a zero-argument function name is called by adding () after it or around it, e.g., pi().
* "Flexible token format" - both require operators to be delimited.
* "Use indentation for grouping" - both use indentation for grouping
* "Block expressions yield multiple values" - In sweet-expressions, you use usual Scheme procedures, including value, instead of having special syntax.
* REPL: In sweet-expressions, you usually end a line with ENTER ENTER.  Q2 doesn't, but I worry that you have to be careful or it'll end where it syntactically might not need to.

Again, thanks for the pointer!

--- David A. Wheeler