rhombus-prototype icon indicating copy to clipboard operation
rhombus-prototype copied to clipboard

Add Wraith syntax proposal

Open cwebber opened this issue 4 years ago • 3 comments

This proposes a different surface syntax which preserves s-expression structure under the hood but is indentation based, akin to Python.

See wraith/wraith.md for a tutorial and examples, and comes with a working language.

As a bonus, here is a substantial example of Wraith in use with Slideshow.

cwebber avatar Dec 16 '21 22:12 cwebber

Is it a syntax error to provide more than one infix operation per grouping? I generally agree that separate operations should have grouping explicit by default, but only if this check can be done syntactically rather than at runtime.

In the reference section, I recommend also showing how the syntax is transformed into s-expressions like you do for your examples.

I know @mflatt really wanted support for algebra-style function calls.

slaymaker1907 avatar Dec 18 '21 01:12 slaymaker1907

It sounds like @AlexKnauth may be interested in carrying this in a more shrubbery-like direction, which is where it seems Rhombus will go. I've expressed my reservations about that elsewhere, but I think deciding whether or not to leave this open or close it could depend on whether or not there's an interest in the shrubbery/wraith idea-merging. I won't be contributing to that effort personally, but I think it's perfectly fine to continue using this PR for that purpose, if anyone wants to.

cwebber avatar Jan 07 '22 13:01 cwebber

You mentioned a hybrid approach briefly in the meeting on Thursday. I'd be interested in seeing what that could look like?

spdegabrielle avatar Jan 08 '22 17:01 spdegabrielle