Re: extends and implements

2011-11-08 Thread Kagamin
Jesse Phillips Wrote: The second is when I want to find its definition. Hmmm, should I be greping for /class Window/, /interface Window/, or /struct Window/ [a-z]* Window ?

extends and implements

2011-11-07 Thread %u
Hello. I know D isn't Java, but one trivial thing I liked about Java is the introduction of 'extends' and 'implements' as keywords as ways to clarify the class relationships when defining a class. You know: class Subclass extends SuperClass implements AnInterface { ... } Will they ever add

Re: extends and implements

2011-11-07 Thread Steven Schveighoffer
On Mon, 07 Nov 2011 13:22:07 -0500, %u n...@devnull.com wrote: Hello. I know D isn't Java, but one trivial thing I liked about Java is the introduction of 'extends' and 'implements' as keywords as ways to clarify the class relationships when defining a class. You know: class Subclass extends

Re: extends and implements

2011-11-07 Thread Andrej Mitrovic
If you need some kind of textual information on whether its a class or an interface, you can name your interfaces with an I. interface IShape { } abstract class Drawable { } class Rectangle : IShape, Drawable {} It's pretty common in other languages, I've seen it used in D as well.

Re: extends and implements

2011-11-07 Thread Alex Rønne Petersen
On 07-11-2011 19:22, %u wrote: Hello. I know D isn't Java, but one trivial thing I liked about Java is the introduction of 'extends' and 'implements' as keywords as ways to clarify the class relationships when defining a class. You know: class Subclass extends SuperClass implements

Re: extends and implements

2011-11-07 Thread Justin Whear
You can do this and/or use the convention of extends first, implements second: class Rectangle : Drawable, IShape, IOtherInterface {} If you're really concerned about clarity, use comments: class Rectangle : /* extends */ Drawable, /* implements */ IShape { } Andrej Mitrovic

Re: extends and implements

2011-11-07 Thread Trass3r
You can do this and/or use the convention of extends first, implements second: class Rectangle : Drawable, IShape, IOtherInterface {} It's not a convention, the spec demands that. http://d-programming-language.org/class.html If you're really concerned about clarity, use comments: class

Re: extends and implements

2011-11-07 Thread %u
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article On Mon, 07 Nov 2011 13:22:07 -0500, %u n...@devnull.com wrote: In order for such a humongously code-breaking change to occur, there would have to be dire reasons why this was necessary. Because you liked Java is not a

Re: extends and implements

2011-11-07 Thread Steven Schveighoffer
On Mon, 07 Nov 2011 14:07:56 -0500, %u n...@.com wrote: == Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article On Mon, 07 Nov 2011 13:22:07 -0500, %u n...@devnull.com wrote: In order for such a humongously code-breaking change to occur, there would have to be dire reasons why

Re: extends and implements

2011-11-07 Thread Dejan Lekic
Andrej Mitrovic wrote: class Rectangle : IShape, Drawable {} It's pretty common in other languages, I've seen it used in D as well. I used the same naming convention for interfaces until I saw this presentation: http://www.infoq.com/presentations/It-Is-Possible-to-Do-OOP- in-Java (jump to

Re: extends and implements

2011-11-07 Thread Jesse Phillips
On Mon, 07 Nov 2011 18:22:07 +, %u wrote: Hello. I know D isn't Java, but one trivial thing I liked about Java is the introduction of 'extends' and 'implements' as keywords as ways to clarify the class relationships when defining a class. You know: class Subclass extends SuperClass

Re: extends and implements

2011-11-07 Thread Jacob Carlborg
On 2011-11-07 20:36, Dejan Lekic wrote: Andrej Mitrovic wrote: class Rectangle : IShape, Drawable {} It's pretty common in other languages, I've seen it used in D as well. I used the same naming convention for interfaces until I saw this presentation:

Re: extends and implements

2011-11-07 Thread Jacob Carlborg
On 2011-11-08 03:07, Jesse Phillips wrote: On Mon, 07 Nov 2011 18:22:07 +, %u wrote: Hello. I know D isn't Java, but one trivial thing I liked about Java is the introduction of 'extends' and 'implements' as keywords as ways to clarify the class relationships when defining a class. You