Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Your question need some clarification. </p> <ol> <li><p>The transformation <code>(f x) &lt;---&gt; f(x)</code> seems to be named <strong>lens</strong>, not a syntactic sugar. Lenses are bidirectional transformations, where as syntactic sugar mostly considered as one-way transformation. Boomerang project provides some tools for making lenses; some research papes are listed here: <a href="http://www.seas.upenn.edu/~harmony/" rel="nofollow">http://www.seas.upenn.edu/~harmony/</a>. Still, I agree that some kinds of syntactic sugar may be implemented as lenses.</p></li> <li><p>Generally, it is allowed to use both "sugared" and "de-sugared" syntactic forms at the same place, where as <code>f(x)</code> and <code>(f x)</code> seems to be mutually exclusive. Does <code>(f x g(h y))</code> mean <code>(f x g (h y))</code> or <code>(f x (g h y))</code>? Yes, you may disambiguate this by treating spaces to be significant, but there is some drawback.</p></li> <li><p>Changing language syntax at any point is a different matter. Such <strong>inline</strong> clauses as "now forget (f x) syntax and use f(x) syntax" may be seen as a source of inconsistency; at the other hand, such clauses as "extend current binary operator set with binary operator #$" may be seen as a usefull feature.</p></li> <li><p>There is need for even more clarification.</p></li> </ol> <p>I plan to list all the languages that can change their syntax after additional clarification; probably, this will be new question at <a href="http://programmers.stackexchange.com">http://programmers.stackexchange.com</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload