|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
D - class interface declaration style
D is suffering from colonitis
I would prefer "wordy" class and interface declarations syntax like Java
I like declarations that are easier to read at first glance
Of course this has a snowball's chance in hell of changing
========================================
D syntax style
interface IControl
{
void Paint();
}
interface ITextBox : IControl
{
void SetText(string text);
}
class TextBox : ITextBox, IControl
{
..
} .
class MyBaseC // no explicit abstract class in D
{
public:
void MyMethod(); // Abstract method
}
class MyDerivedC : MyBaseC
{
..
}
=================================
Java syntax style
public interface IControl
{
void Paint();
}
public interface ITextBox implements IControl
{
void SetText(string text);
}
class TextBox implements ITextBox, IControl
{
..
}
public abstract class MyBaseC // Abstract class
{
public abstract void MyMethod(); // Abstract method
}
public class MyDerivedC extends MyBaseC
{
..
}
=========================================
C# syntax style
interface IControl
{
void Paint();
}
interface ITextBox : IControl
{
void SetText(string text);
}
class TextBox : ITextBox // TextBox implements both IControl and ITextBox
{
..
} .
abstract class MyBaseC // Abstract class
{
public abstract void MyMethod(); // Abstract method
}
class MyDerivedC : MyBaseC
{
..
}
Dec 31 2003
"Mark T" <Mark_member pathlink.com> wrote in message news:bsvnp6$2i1o$1 digitaldaemon.com...D is suffering from colonitis I would prefer "wordy" class and interface declarations syntax like Java I like declarations that are easier to read at first glance Of course this has a snowball's chance in hell of changing Dec 31 2003
|