[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lightweight function syntax (again)
- From: Axel Kittenberger <axkibe@...>
- Date: Tue, 23 Nov 2010 18:46:31 +0100
>
> But ... OUCH! ... surely an empty parameter list should be
> denoted by <> rather than just < which, IMO, looks grotesque!
Thats why IMHO there is no reason that an empty parameter list needs a >.
(<=nil) -- i'd really like that double lined pointer pointing outward.
(< if upvalue then print "yes" end) -- think of < it again
2010/11/23 Pierre-Yves Gérardy <pygy79@gmail.com>:
> I don't mind the < too much, but you'd have to make "(<" a token,
> otherwise, the grammar would be ambiguous. This means you couldn't put
> spaces between the opening parenthese and the less than sign.
I dont think it would be ambigious, as currently a less sign can never
be followed by an open parenthesis. It would always need a value first
to be less than something else.
Thats the reason why I silently discarded the idea of using <( x+y )>
since this could mean for the parser smaller than x + y as well, at
least up to an undefined amount of look ahead later.
>
> -- Pierre-Yves
>
>
>
> On Tue, Nov 23, 2010 at 18:26, Joseph Manning <manning@cs.ucc.ie> wrote:
>> On 2010-Nov-23 (Tue) at 18:11 (+0100), Axel Kittenberger wrote:
>>
>>>> Just playing around, how do you like these, all of the same grammar,
>>>> different cases:
>>
>> Dear Axel,
>>
>> Not bad. Although I'd prefer => over = for denoting "return".
>>
>> But ... OUCH! ... surely an empty parameter list should be
>> denoted by <> rather than just < which, IMO, looks grotesque!
>>
>> Thus, using your first and fifth examples,
>>
>> ( <> = nil )
>>
>> and
>>
>> ( <> if upvalue then print "yes" end )
>>
>> Joseph
>>
>> ------------------------------------------------------------------------
>> Joseph Manning / Computer Science / UCC Cork Ireland / manning@cs.ucc.ie
>> ------------------------------------------------------------------------
>>
>>
>
>
- References:
- Re: [ANN] Lua 5.2.0 (alpha-rc2) now available, Luiz Henrique de Figueiredo
- Re: [ANN] Lua 5.2.0 (alpha-rc2) now available, Petite Abeille
- Re: [ANN] Lua 5.2.0 (alpha-rc2) now available, Pierre-Yves Gérardy
- Lightweight function syntax (again) Re: [ANN] Lua 5.2.0 (alpha-rc2) now available, Mark Hamburg
- Re: Lightweight function syntax (again) Re: [ANN] Lua 5.2.0 (alpha-rc2) now available, steve donovan
- Re: Lightweight function syntax (again) Re: [ANN] Lua 5.2.0 (alpha-rc2) now available, Mark Hamburg
- Re: Lightweight function syntax (again) Re: [ANN] Lua 5.2.0 (alpha-rc2) now available, Pierre-Yves Gérardy
- Re: Lightweight function syntax (again) Re: [ANN] Lua 5.2.0 (alpha-rc2) now available, steve donovan
- Re: Lightweight function syntax (again), Drake Wilson
- Re: Lightweight function syntax (again), Axel Kittenberger
- Re: Lightweight function syntax (again), Joseph Manning
- Re: Lightweight function syntax (again), Pierre-Yves Gérardy