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

Re: sweet-expressions are not homoiconic

Beni Cherniavsky-Paskin <cben@xxxxxxxxxxxx> wrote:
> Other notable examples:
> - YAML which has largely won over JSON as a human-writable notation.
> - Lists & quotations in Markdown, reStructuredText etc.
> - The triumvirate of
>   - HAML
>   - Sass
>   - Coffeescript

Great points.  I'll add them to the SRFI, as well as some other links.
Certainly it shows that this approach has been used in many places.
F#, HAML, Sass, and Coffeescript are certainly not old, so it's not an idea
that has disappeared.

> As for "expressing thought", a lot of pseud-code styles use indentation for
> grouping.

> StructuredText was a notable cautionary tale - it used indentation for
> everything including chapter structure, which caused whole documents to be
> intented (similar to the define-library situation); reStructuredText was
> borne out of fixing that.

I think that is important to note.  It's all fine and well to say
"don't add markers to indentation-based languages"... until you try to USE it.
Then you find that indentation sensitivity is MOSTLY fine... and the trick
is to fix the mostly.

> - Python tightly anchored the transition from indentation to delimiters to
> the semantical statement/expression boundary.  As a result lambdas are
> crippled forever â nobody came up with a satisfactory syntax for
> statements-inside-lambdas.
>   If Python were defined on top of Sweet expressions one would be free to
> keep the lambda and the surrounding function call(s) in indentation land.

Agreed.  Since we've focused on having a *general* notation, we
don't have that problem at all.

> Neoteric & Sweet expressions advance the state of the art by separating
> infix and indentation sensitivity from the rest of the language design.
>  This allows other sugar to be  defined over an already parsed tree
> (ideally via macros inside the language), which facilitates language
> innovation â same way s-expressions did.
> Don't judge it merely on bringing indentation to the homoiconic Lisp world
> â it's also bringing the gift of homoiconity to the indentation (and
> infix)-loving crowd!
> I don't know if the experiment will succeed, but I'm happy that David is
> trying.


--- David A. Wheeler