'partial' keyword in C# is very good for project , what's the same thing in D?
Regan Heath via Digitalmars-d
digitalmars-d at puremagic.com
Wed Nov 12 07:05:46 PST 2014
On Mon, 10 Nov 2014 18:09:12 -0000, deadalnix <deadalnix at gmail.com> wrote:
> 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.
Someone raised concerns.. I haven't looked into it myself. If it can,
great :)
R
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the Digitalmars-d
mailing list