Re: object.struct.element as lvalue
Re: object.struct.element as lvalue
- Subject: Re: object.struct.element as lvalue
- From: Matt Neuburg <email@hidden>
- Date: Tue, 22 Jan 2013 18:09:01 -0800
On Jan 22, 2013, at 2:51 PM, John McCall <email@hidden> wrote:
> Heh. And even that is actually incorrect, because you can do things like x.count += 6, which is translated as [x setCount: [x count] + 6] (except only evaluating 'x' once).
Ouch!
>
> I would say that object.struct is a special kind of l-value that's limited in how it can be used. You can use it as the l-value operand of a simple assignment, compound assignment, increment, or decrement operator, but any other use causes it to be converted to an r-value.
Okay, I'll think of some new wording... :) Thx - m.
--
matt neuburg, phd = email@hidden, http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Programming iOS 5! http://shop.oreilly.com/product/0636920023562.do
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden