[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ternary operator patch
- From: Miles Bader <miles@...>
- Date: Thu, 16 Sep 2010 09:39:43 +0900
On Thu, Sep 16, 2010 at 1:27 AM, Henk Boom <henk@henk.ca> wrote:
>> Are there any gotchas with the new method that are likely to arise in
>> practice?
>
> Off the top of my head:
>
> foo(bar)
> ("string literal"):baz()
>
> Could be useful in either interpretation (assuming you've given the
> string's metatable something useful to call as a statement)
Hmm, could happen with other metatables too, which is perhaps a bit
more dangerous...
E.g., if X and Y are vectors (like in graphics);
X = compute_x ()
Y = compute_y ()
(X-Y):lineto ()
Boom!
Hmm, that actually does seem like a problem ...
-Miles
--
Cat is power. Cat is peace.
- 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, Fabien
- Re: Ternary operator patch, David Kastrup
- Re: Ternary operator patch, Fabien
- Re: Ternary operator patch, mauro iazzi
- Re: Ternary operator patch, Tony Finch
- Re: Ternary operator patch, Miles Bader
- Re: Ternary operator patch, Henk Boom