Does D have too many features?
Alex Rønne Petersen
xtzgzorex at gmail.com
Sun Apr 29 13:05:05 PDT 2012
On 28-04-2012 21:36, Andrej Mitrovic wrote:
> On 4/28/12, Walter Bright<newshound2 at digitalmars.com> wrote:
>> What's your list?
>
> I don't mind extra features, just as long as they're properly
> documented and implemented. For example, I have absolutely no uses for
> anonymous classes right now, but I know DWT2 uses them and probably
> other people do use them.
I use them too. They're useful if you have an abstract method that just
needs to return an arbitrary object implementing some interface or whatever.
>
> Personally I find the hardest threads to to follow are the ones
> discussing in/out/inout/autoref. For one thing there are compiler
> bugs, but then there are misconceptions between what developers vs
> documentation vs core devs say about them. And then you mix in classes
> and templates into the story and it all becomes a large forest of
> information that is very hard to digest.
>
> Another feature I'm curious about is .dup/.idup. It's basically
> hardcoded for a couple of types, but why not instead use UFCS and
> implement .dup/.idup in std.array as a free function? Then you might
> even use it for user-types by requiring a type to implement .dup/.idup
> functions.
This seems reasonable to me.
>
> Also there's mixin templates. What exactly is the difference between
> mixin templates and regular templates? We can use the mixin statement
> for both types right now, so there doesn't seem to be a distinction.
> For example, if you take samples from the template mixin page
> (http://dlang.org/template-mixin.html) and you remove "mixin" from the
> template declaration, all of the samples will continue to work. You
> could remove this declaration feature right now and you probably
> wouldn't break any code at all. Seems like low-hanging fruit to me.
--
- Alex
More information about the Digitalmars-d
mailing list