'partial' keyword in C# is very good for project , what's the same thing in D?
deadalnix via Digitalmars-d
digitalmars-d at puremagic.com
Mon Nov 10 10:09:12 PST 2014
On Monday, 10 November 2014 at 10:21:34 UTC, Regan Heath wrote:
> On Fri, 31 Oct 2014 09:30:25 -0000, Dejan Lekic
> <dejan.lekic at gmail.com> wrote:
>> In D apps I work on I prefer all my classes in a single
>> module, as is common "D way", or shall I call it "modular way"?
>
> Sure, but that's not the point of partial. It's almost never
> used by the programmer directly, and when it is used you almost
> never need to look at the generated partial class code as "it
> just works". So, you effectively get what you "prefer" but you
> also get clean separation between generated and user code,
> which is very important if the generated code needs to be
> re-generated and it also means the user code stays simpler,
> cleaner and easier to work with.
>
> Basically it's just a good idea(TM). Unfortunately as many
> have said, it's not something D2.0 is likely to see. String
> mixins aren't the nicest thing to use, but at least they can
> achieve the same/similar thing.
>
> R
I don't get how the same can't be achieved with mixin template
for instance.
More information about the Digitalmars-d
mailing list