Re: D/Objective-C Preliminary Design

2010-11-06 Thread Walter Bright
Michel Fortin wrote: I'm know I should release things early to let those interested test it and give me some feedback (and create bindings), but I'm not sure whether it should be merged into the trunk so early. With Walter's permission, I could publish my git repository to let people peek at th

Re: D/Objective-C Preliminary Design

2010-11-04 Thread Robert Clipsham
On 04/11/10 00:51, Walter Bright wrote: Michel Fortin wrote: You heard that right: someone is considering writing Cocoa programs because of D! That's great news! I think we should try to attract Cocoa programmers (and would-be Cocoa programmers) by offering them the strengths of D. What are

Re: D/Objective-C Preliminary Design

2010-11-04 Thread Jacob Carlborg
On 2010-11-04 13:08, Michel Fortin wrote: On 2010-11-04 07:37:25 -0400, Kagamin said: 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 insertItemWithObjectVal

Re: D/Objective-C Preliminary Design

2010-11-04 Thread Anders F Björklund
Michel Fortin wrote: Remove that and you've got something that doesn't read well and on top of that looks out of place in a D program. The JavaBridge had lots of those functions, while it was alive: http://developer.apple.com/legacy/mac/library/documentation/Cocoa/Conceptual/Legacy/JavaBridge/

Re: D/Objective-C Preliminary Design

2010-11-04 Thread Michel Fortin
On 2010-11-03 20:51:00 -0400, Walter Bright said: Michel Fortin wrote: You heard that right: someone is considering writing Cocoa programs because of D! That's great news! I think we should try to attract Cocoa programmers (and would-be Cocoa programmers) by offering them the strengths of

Re: D/Objective-C Preliminary Design

2010-11-04 Thread Michel Fortin
On 2010-11-04 04:14:41 -0400, Anders F Björklund said: Michel Fortin wrote: But the issue isn't the underscore, it's the verbosity of Objective-C method names. Method names in Objective-C tend to be long and expressive, they are meant to have the arguments interleaved between each part of the

Re: D/Objective-C Preliminary Design

2010-11-04 Thread Michel Fortin
On 2010-11-03 23:28:38 -0400, Jason House said: What's the minimal set of O-C integration that would make your work usable? I'd try to get that in early and incrementally improve functionality. That's a tricky question that depends on what you mean by "usable". I'd say that supporting exter

Re: D/Objective-C Preliminary Design

2010-11-04 Thread Michel Fortin
On 2010-11-04 07:37:25 -0400, Kagamin said: 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 a

Re: D/Objective-C Preliminary Design

2010-11-04 Thread Kagamin
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. > > > > Comments? Do you require explicit selector declaration? I'm afraid, this w

Re: D/Objective-C Preliminary Design

2010-11-04 Thread Paolo Invernizzi
Sean Kelly Wrote: > I like the way you've done it. It seems like the Obj-C approach is kind of a > sneaky way of implementing function overloading in C. > D supports overloading, so there's no point in creating function names that > include parameter names simply to match the Obj-C definition.

Re: D/Objective-C Preliminary Design

2010-11-04 Thread Anders F Björklund
Michel Fortin wrote: But the issue isn't the underscore, it's the verbosity of Objective-C method names. Method names in Objective-C tend to be long and expressive, they are meant to have the arguments interleaved between each part of the selector. This interleaving makes Objective-C code very na

Re: D/Objective-C Preliminary Design

2010-11-04 Thread Anders F Björklund
Walter Bright: I need them to work with the Objective-C object model. By making Objective-C objects bind to D semantics, all those feature will "just work" with Cocoa with minimal changes to the frontend (and well written bindings). I don't know O-C. I've never written a line of it. So I'm sho

Re: D/Objective-C Preliminary Design

2010-11-03 Thread BCS
Hello Michel, [o addObserver:self forKeyPath:@"window.frame" option:0 context:nil]; [...] Now imagine a whole program with functions like this one. Would you want to write a program like that? I know, not what you were saying but, err,.. No.

Re: D/Objective-C Preliminary Design

2010-11-03 Thread Jason House
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. > > > > Comments? It looks like a few things are already implemented. I'd recommen

Re: D/Objective-C Preliminary Design

2010-11-03 Thread Walter Bright
Michel Fortin wrote: You heard that right: someone is considering writing Cocoa programs because of D! That's great news! I think we should try to attract Cocoa programmers (and would-be Cocoa programmers) by offering them the strengths of D. What are those strengths? Some are things you pro

Re: D/Objective-C Preliminary Design

2010-11-03 Thread Michel Fortin
On 2010-11-03 18:40:36 -0400, Walter Bright said: Michel Fortin wrote: On 2010-11-03 13:55:35 -0400, Walter Bright said: Thanks for doing this! You're welcome. "To make Objective-C methods accessible to D programs, we need to map them to a D function name. This is acomplished by declar

Re: D/Objective-C Preliminary Design

2010-11-03 Thread Sean Kelly
Michel Fortin Wrote: > On 2010-11-03 13:55:35 -0400, Walter Bright said: > > > Thanks for doing this! > > You're welcome. > > > > "To make Objective-C methods accessible to D programs, we need to map > > them to a D function name. This is acomplished by declaring a member > > function and g

Re: D/Objective-C Preliminary Design

2010-11-03 Thread Walter Bright
Michel Fortin wrote: On 2010-11-03 13:55:35 -0400, Walter Bright said: Thanks for doing this! You're welcome. "To make Objective-C methods accessible to D programs, we need to map them to a D function name. This is acomplished by declaring a member function and giving it a selector:"

Re: D/Objective-C Preliminary Design

2010-11-03 Thread lurk
Nick Sabalausky Wrote: > "%u" wrote in message news:iap1l4$17h...@digitalmars.com... > >I found a slideshow called 'The Expressiveness of Go' recently. The > >conclusions are: > > > > * Go is not a small language but it is an expressive and comprehensible > > one. > > > > * Expressiveness comes

Re: D/Objective-C Preliminary Design

2010-11-03 Thread Michel Fortin
On 2010-11-03 13:55:35 -0400, Walter Bright said: Thanks for doing this! You're welcome. "To make Objective-C methods accessible to D programs, we need to map them to a D function name. This is acomplished by declaring a member function and giving it a selector:" Why not just make the D

Re: D/Objective-C Preliminary Design

2010-11-03 Thread Walter Bright
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. Comments? Thanks for doing this! "To make Objective-C methods accessible to D prog

Re: D/Objective-C Preliminary Design

2010-11-03 Thread Michel Fortin
On 2010-11-03 13:44:27 -0400, Marianne Gagnon said: I found a confusing part : Here is an abbreviated declaration for NSString: extern (Objective-C) class NSComboBox ... This declaration [...] will let know to the compiler that the NSColor class exists Oops, I changed my example but forgot

Re: D/Objective-C Preliminary Design

2010-11-03 Thread Marianne Gagnon
I found a confusing part : Here is an abbreviated declaration for NSString: extern (Objective-C) class NSComboBox ... This declaration [...] will let know to the compiler that the NSColor class exists =P Otherwise seems nice but I'll let people that know DMD answer --Auria > I posted on my blo

D/Objective-C Preliminary Design

2010-11-03 Thread Michel Fortin
I posted on my blog a preliminary document outlining what I intent to implement in DMD to support the Objective-C object model. Comments? -- Michel Fortin michel.for...@michelf.com http://michelf.com/