November 04, 2010 Re: D/Objective-C Preliminary Design | ||||
|---|---|---|---|---|
| ||||
Michel Fortin Wrote: > I posted on my blog a preliminary document outlining what I intent to implement in DMD to support the Objective-C object model. > > <http://michelf.com/weblog/2010/dobjc-preliminary-design/> > > Comments? Do you require explicit selector declaration? I'm afraid, this will lead to a large duplication: extern (Objective-C) class NSComboBox : NSTextField { private void* _dataSource; void insertItemWithObjectValue(ObjcObject object, NSInteger atIndex) [insertItemWithObjectValue:atIndex:]; void insertItemWithObjectValue(ObjcObject object) [insertItemWithObjectValue:]; } comboBox.insertItemWithObjectValue(val, idx); // [comboBox insertItemWithObjectValue:val atIndex:idx] comboBox.insertItemWithObjectValue(val); // [comboBox insertItemWithObjectValue:val] compiler can build selector automatically from function signature. | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply