Does D have too many features?
Adam D. Ruppe
destructionator at gmail.com
Tue May 1 20:38:40 PDT 2012
On Wednesday, 2 May 2012 at 03:22:02 UTC, Andrei Alexandrescu
wrote:
> One feature to remove stands out - the struct initialization:
> S s = { 1, 2 };
I could live without that one, because D has an alternative:
auto s = S(1, 2);
And I'd be sad if you took that out, as I use it a lot, especially
for trivial types:
struct Html { string src; }
struct Text { string src; }
struct Point { int x; int y; }
struct Size { int width; int height; }
which I like because then we can use the types for overloading,
static checks, etc., and it is very very simple to drop in and
use.
I guess there could be opCalls or constructors, but poo, it
works now without that and I like it.
More information about the Digitalmars-d
mailing list