[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ternary operator patch
- From: David Kastrup <dak@...>
- Date: Tue, 14 Sep 2010 11:22:50 +0200
Ryota Hirose <hirose.ryota@gmail.com> writes:
> Hello Lua Hackers,
>
> I fixed my patch for handling local variables or else. This patch
> can compile various codes. Is this patch OK?
>
> BTW, my opinion of discussions:
>
> Is a ternary operator necessary in Lua? I think NO for almost Lua
> programmer. and/or idiom work fine in almost case. But, it may
> cause a bug which is hard to solve.
>
> Which syntax is good for ternary operator? I think ? : is best, but
> : is an oeprator for method calling, so lexer will face ambiguity.
It would appear that nobody has learnt the lesson that C++ got from
grabbing Ada generic syntax (which in Ada is a straightforward and
logical application of constraint syntax) without thinking. It has made
a messy grammar quite messier.
Lua is not a line noise language. That's not an invitation for pulling
in the favorite line noise constructs from some other language because
it causes almost no conflicts with preexisting line noise.
--
David Kastrup
- References:
- Re: Ternary operator patch, Henk Boom
- Re: Ternary operator patch, steve donovan
- Re: Ternary operator patch, Geoff Leyland
- Re: Ternary operator patch, steve donovan
- Re: Ternary operator patch, Miles Bader
- Re: Ternary operator patch, David Kastrup
- Re: Ternary operator patch, Miles Bader
- Re: Ternary operator patch, David Kastrup
- Re: Ternary operator patch, Jonathan Castello
- Re: Ternary operator patch, Roberto Ierusalimschy
- Re: Ternary operator patch, Enrico Tassi
- Re: Ternary operator patch, Doug Rogers
- Re: Ternary operator patch, Ryota Hirose
- Re: Ternary operator patch, Ryota Hirose