December 31, 2003 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 { .. } |
January 01, 2004 Re: class interface declaration style | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mark T | "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 Asked and answered. :::) |
Copyright © 1999-2021 by the D Language Foundation