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

Re: Please update SRFI-105



2012/10/30 David A. Wheeler <dwheeler@xxxxxxxxxxxx>:

>> At the very least, it seems the bit "must be spelled as 'list_ref'
>> inside the infix.plt notation without effort." doesn't seem to scan
>> well.  I'm not sure what you mean here by the "without effort" clause;
>> I suspect it's a mistake, but maybe you meant something else?

For the record infix.plt was not meant to be the final say in infix notation.
The implementation on Planet was just meant to be something to try out.
In fact I have changed some of the decisions in Bracket.

Since this discussion is in the rationale section, I think, the rationale
of infix.plt is more relevant than the actual implementation.

The rationale was more or less as follows:
  i)   The operations + - * /  ^
       is written using their standard syntax
 ii)   No other operations get special syntax
 iii)  function application is   name[]
       (same choice as Mathematica - but it could
        easily be name()  instead)
 iv)  Since - is used in Scheme names, one can use _
       to write names using -.
 v)   Other names can be written using | | syntax.

In the rationale I haven't mentioned the syntax
chosen to delimit the infix expressions. That's on purpose,
since I had and haven't decided what I like best yet.

The implementation has a few more bells and whistles
mostly stolen from:
http://reference.wolfram.com/mathematica/guide/Syntax.html

The rationale is to keep the infix operations to the essentials in
order not to interfere too much with builtin names of Scheme.
Since - is so common in the variable names, a special syntax _
is needed. Other names can be used by the standard | | syntax
for peculiar variable names.

I think the comment about the grammar in the source should
be left out. It wasn't meant to be used as final documentation.
It was just to get started. Read the actual source to see
the exact accepted grammar.

-- 
Jens Axel SÃgaard