D/Objective-C 64bit
Jacob Carlborg via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Thu Oct 30 09:59:51 PDT 2014
On 2014-10-30 10:16, Martin Nowak wrote:
> Instead of adding the selector syntaxsyntax you could reuse pragma mangle.
>
> extern (Objective-C)
> class NSComboBox : NSTextField
> {
> private void* _dataSource;
>
> pragma(mangle, objcMangle!(NSComboBox, "insertItemWithObjectValue",
> "atIndex")
> void insertItem(ObjcObject object, NSInteger value);
> }
>
> Alternatively a compiler recognized UDA would work too.
>
> @objcSel!("insertItemWithObjectValue", "atIndex")
> void insertItem(ObjcObject object, NSInteger value);
>
> Changing the lexer and parser would affect all D language tools
> (editors, formatters, linters, other compilers). So now that we do have
> UDAs I don't see a justification for changing the syntax and grammar of D.
Seems like a fair point, I guess I could change that. I prefer using a
UDA for this.
--
/Jacob Carlborg
More information about the Digitalmars-d-announce
mailing list