[Patch][ObjC][Proposal] NSValue literals
rjmccall at apple.com
Mon Mar 16 17:00:32 PDT 2015
> On Feb 16, 2015, at 9:31 AM, AlexDenisov <1101.debian at gmail.com> wrote:
> Don’t want to push or force you, just curious: how is it going? :)
> How much time it usually takes to review such patches?
> P.S. I have got commit access few days ago, just fyi
Hi, Alex. Sorry for the long delay.
The consensus of the internal language-review team is that we think this is a great idea, but that it should be more generally opt-in rather than being tied to hard-coded types. There are two dimensions of this.
The first is that you should add an attribute, __attribute__((objc_boxable)), that goes on struct declarations. The @(…) syntax should only allow a struct operand if it has this attribute. Make sure you test the __has_attribute for this. You should also make sure that redeclarations after the definition can add this attribute and have it still be respected by the type-checker; this will be extremely useful for people migrating code to SDKs that lack these attributes.
The second is that the implicit code pattern shouldn’t try to use the convenience factory methods; just use +[NSValue valueWithBytes:objCType:].
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits