
I think lambdas should shouldn’t be allowed to span more than 1 line :stuck_out_tongue:

More seriously: Is it (going to be) parsed into s-exps? Will it be easy to switch multiples time between different readers (say s-exp and shrubbery) within the same file?

But otherwise I kind of like it. It’s concise and readable at least. I worry a little that its syntax is too flexible, which may lead to a large mix of styles among coders and a lot of inconsistency among new users. And style wars.

[Happy to answer here, but this discussion should probably be in the GitHub PR.] While shrubbery notation is intended to be parsed into S-expressions, it’s not intended to support switching notations back and forth, because the bindings that make sense for shrubbery notation are different than the bindings that make sense for S-expression notation. See https://github.com/mflatt/racket2-rfcs/blob/shrubbery/shrubbery/0000-shrubbery.md#parsed-representation for example parses.

ah that’s too bad. It’s a good starting point though. I’m glad you gave the pros and cons. I must say the cons look far from negligible to me however.

(doesn’t mean I have a better counter proposal)

I’ve read through the proposal and the demo, and so far I’m liking it at first glance. It reminds me of Coffeescript which is an alternative notation for Javascript and shares some similar syntactic conventions as Shrubbery.
I’m not a programming language expert so it’s hard to say how well this design idea works in practice.
Is Shrubbery an actual #lang that can be installed and experimented with at this time?
This brings me to my next question, does Racket2-rfcs has any plans to establish some kind of reference comparison project where various proposals can be used to implement one or several examples to show off what various notations can do and their tradeoffs? Similar to how http://todomvc.com/ provide examples of various JS frameworks showing how they can be used to implement a reference Todo web application.
The above could be a useful way for interested non-expert users to try out notations as ordinary programming exercises.

Shrubbery notation is not set up as #lang
, but the description links to “parse.rkt”, which is a parser that you can run. There’s no comparison project right now. For the three most recent proposals, I have tried out more or less the same examples in “demo.lexpr” and “demo.sap” and “demo.shrb” that you can find the PR description or discussion. Mine wasn’t a very formal comparison (but I don’t think we’re at a very formal phase).

thanks! I’ll go and try to run the parser myself. FYI the lexprs link in the Prior art section in the shrubbery proposal is a broken link

Thanks for the alert on the Lexprs link - now fixed.

I’ll go on record and say that one of the things I like about Shrubbery is the use of define
keyword for both functions and variables, rather than using separate keywords such as fun
and var
.

Just to be clear, define
isn’t part of the shrubbery layer, just like define
isn’t built into S-expressions. It’s a suggestion on how a language (to be defined) might use shrubbery notation. But I certainly appreciate that you like that choice in the examples. :slightly_smiling_face:

Ahh, thank you for the clarification, I hadn’t appreciated the distinction between a notation for constructing tokens or lexemes versus a language built in that notation. I was conflating the two in my mind.

The “racket2-rfcs” repo has been renamed “rhombus-brainstorming”. The old name redirects.


I’m going to confuse everyone by renaming this channel as rhombus

@spdegabrielle has renamed the channel from “racket2” to “rhombus”

@spdegabrielle I saw this and I was like “Oh god it’s called Rhombus”

@mflatt so the obvious question: Why ‘rhombus’? (Bearing in mind it’s just a codename)