Re: Syntax extensions Amirouche Boubekki 06 Mar 2021 09:47 UTC

Hello Jakub and all :-)

I think this conversation is related to yellow docket [0]

[0] https://github.com/johnwcowan/r7rs-work/blob/master/ColorDockets.md#yellow-docket-syntax

Le ven. 5 mars 2021 à 21:44, Jakub T. Jankiewicz <xxxxxx@onet.pl> a écrit :
>
> Hi,
>
> I plan to work on new SRFI I would know what you think about my idea.
> I've already implemented first idea in my Scheme based lisp called LIPS
> written in JavaScript.
>
> The feature I want to work on is called syntax extensions is the way to add
> new syntax like build in , ' ` ,@ that work exactly the same, that would
> allow users to modify the parser/reader. The feature work similar to
> compiler extensions in Common Lisp. You define the mapping - string of one or
> more characters and symbol for a function or macro that will be called when
> parser/reader will read the token with S-Expression that immediately follow
> the token.

I want to chime in as a Scheme user, a newbie Scheme implementer or
even more newbie language designer.

A large part of my appeal to Scheme is the "no syntax" or "absence of
syntax" or more commonly written as "the code is the ast".

Adding more literal representations, even more so the ability to
create per program ad-hoc literal representation reduces both the ease
of learning scheme, and the ability to move from one code base to the
other.

Also, it is a second hand view, and also my understanding from reading
the specification that a compliant reader is already complex.

Adding reader hooks will make the implementation of Scheme more
complicated, without much added value.

My arguments are not tradition and not historical, it is about what
are great strengths of standard Scheme in that case simple syntax,
small set of literals.