On Tuesday, 11 March 2014 at 18:23:08 UTC, Jacob Carlborg wrote:
A DIP is available here [1] and the latest implementation is available here [2].


[1] http://wiki.dlang.org/DIP43

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.
              • R... Christian Schneider via Digitalmars-d-announce
              • R... Jacob Carlborg via Digitalmars-d-announce
              • R... Jacob Carlborg via Digitalmars-d-announce
              • R... Christian Schneider via Digitalmars-d-announce
              • R... Jacob Carlborg via Digitalmars-d-announce
              • R... Christian Schneider via Digitalmars-d-announce
              • R... Michel Fortin via Digitalmars-d-announce
              • R... Christian Schneider via Digitalmars-d-announce
            • Re: D... Michel Fortin via Digitalmars-d-announce
              • R... Jacob Carlborg via Digitalmars-d-announce
  • Re: D/Objective-C 64bit Martin Nowak via Digitalmars-d-announce

Reply via email to