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

Re: sweet-expressions are not homoiconic

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



John David Stone:
>         I wouldn't have mentioned it at all if Wheeler hadn't used Icon as
> an example in support of his argument.

A mistake on my part.  My thanks to you and John Cowan for pointing out that
Icon does *not* use syntactically-meaningful indentation.
I've removed Icon from the list, instead added others like F# and ABC.
ABC isn't so common, but it's useful to show that the idea's been around a while.
F# and CoffeeScript are useful to show that there are
people *today* who choose them.


John Cowan:
>  > If you're worried about it, make sure all continued lines end in _,
>  > that's all.

>         Sigh.  Yes, of course -- a marker character... These are
> evidences of _failure to achieve homoiconicity_.  They are design kludges,
> used to paper over the incompatibility between whitespace used for layout
> and whitespace used to signal syntactic structure.

Markers are merely metasymbols, and *all* languages have metasymbols.
Heck, in traditional s-expressions, "(" and ")" are metasymbols because they
represent list constructors and not themselves.  Since s-expressions *are* homoiconic,
it's clear that a notation can have metasymbols (like markers) and still be homoiconic.

It's true that we've created markers to address issues in trying to use
whitespace for syntactic structure.  But these are not kludges; they are metasymbols
that turn a basic concept (syntactically-relevant indentation) into a practical notation.
Since all languages have metasymbols, this should be unsurprising.

The real trick is creating a relatively minimal set of metasymbols that are
powerful and work together.  You can always argue that there might be a better set...
but then you'll need to propose it :-).

--- David A. Wheeler