Am Sonntag, 10. Februar 2013, 21:22:23 schrieb Alan Manuel Gloria:
> Okay, I checked, and I'm not sure how you propose to handle curly-infix.
> It seems, according to your examples, that a line composed of a single
> curly-infix item is that item, not a list of that item.

I rather see curly infix as rewriting the expression:

    {n-1 + n-2}
    + n-1 n-2

but that only works at the beginning of a line. Deeper in the line, it has to 
become the corresponding s-expression…

> So: can you be more clear about how your indentation-based syntax
> interacts with the n-expression stack?

That was a part I wasn’t perfectly sure about when I wrote - and which I could 
not fix before sending, because I wrote late at night and knew that I would not 
have time to improve it the next few days.


- neoteric at the beginning of a line is hard to do right
  (it would always be a double bracket).
- neoteric within a line, or in a line which starts with .
  would just be the corresponding s-expression.
- curly-infix would just be the s-expression - except if
  the whole line is curly-infix. I don’t like that exception…
  maybe the line with only curly infix should just be prefixed
  with a ..

    define : fibup maxnum count n-1 n-2
           if {maxnum = count}
             . {n-1 + n-2}
             fibup maxnum {count + 1} {n-1 + n-2} n-1

The : is just a shortcut for starting a new line at the indentation of the :. So

   define : fibfast n
          if {n < 2}
          . n
          fibup n 2 1 0

could be written as

          fibfast n
          if {n < 2}
          . n
          fibup n 2 1 0

And : . does not change the meaning of the code:

    a b : . c d

is the same as

    a b c d

but it sets an indentation level, so in the following, the second line would 
have higher indentation than a dotted line:

    a b : . c

is the same as

    a b
        . c

which would be dangerous, because the . actually reduces the indentation of the 
line by one and d gets a doubled indentation which is not marked and would be 
quite confusing.

Best wishes,
Ein Würfel System - einfach saubere Regeln:


Attachment: signature.asc
Description: This is a digitally signed message part.

Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
Readable-discuss mailing list

Reply via email to