October 31, 2014 Re: 'partial' keyword in C# is very good for project ,what's the same thing in D? | ||||
---|---|---|---|---|
| ||||
Posted in reply to eles | On Friday, 31 October 2014 at 14:03:04 UTC, eles wrote: > Caught in the act... > > http://www.freogan.org/wp-content/uploads/2009/12/linus-torvald-speedo-300x255.jpg Nice! He's got a sauna at home too. And he does "management by cursing": http://en.wikipedia.org/wiki/Management_by_perkele |
October 31, 2014 Re: 'partial' keyword in C# is very good for project , what's the same thing in D? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Wyatt Attachments: | On Fri, 31 Oct 2014 13:45:37 +0000
Wyatt via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> On Friday, 31 October 2014 at 12:54:30 UTC, FrankLike wrote:
> >
> >> No human uses partial classes in .NET land other than the tools themselves.
> >>
> >
> > Very good,It makes your code look very simple , nice and cool.
> >
> Does the inverse of the Turing test have a name? How am I supposed to react when a human passes it? ;)
just show him IOCCC. he will never return. ;-)
|
October 31, 2014 Re: 'partial' keyword in C# is very good for project ,what's the same thing in D? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On Friday, 31 October 2014 at 13:57:40 UTC, Ola Fosheim Grøstad wrote: > On Friday, 31 October 2014 at 13:50:30 UTC, Andrea Fontana wrote: >> I wonder how linux was written in c. >> I think it's a rather big project to do without partial keyword. > > Finns are hardcore. > They drink a lot. > They swear a lot. > And they bathe in snow after taking a whipping. > Naked… > And they like it… > > Only Linus can create Linux without partial. They are out of control https://www.youtube.com/watch?v=VWHfiEKK3zw |
November 01, 2014 Re: 'partial' keyword in C# is very good for project ,what's the same thing in D? | ||||
---|---|---|---|---|
| ||||
Posted in reply to FrankLike | On Wednesday, 29 October 2014 at 07:41:41 UTC, FrankLike wrote:
> Hello,everyone,
> I've written some projects in C#,find the 'partial' keyword is very userful,which lets the auto codes in another single file,my codes are very easy to update.
> But what the same thing in D?
>
> Thank you,every one.
We never used partial before. So you don't/shouldn't need it as well. /s
|
November 08, 2014 Re: 'partial' keyword in C# is very good for project ,what's the same thing in D? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On Thursday, 30 October 2014 at 07:20:24 UTC, Jacob Carlborg wrote:
> On 2014-10-30 00:00, deadalnix wrote:
>
>> What does it do ?
>
> It lets you split the implementation of a class between multiple source files. I think it's mostly used in C# for tools that generate some codes, i.e. a GUI builder. You have the generated part of the class in one file and the code that is manually edited in another file.
It's a good thing for editing codes.
Frank
|
November 10, 2014 Re: 'partial' keyword in C# is very good for project ,what's the same thing in D? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dejan Lekic | On Fri, 31 Oct 2014 09:30:25 -0000, Dejan Lekic <dejan.lekic@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 -- Using Opera's revolutionary email client: http://www.opera.com/mail/ |
November 10, 2014 Re: 'partial' keyword in C# is very good for project ,what's the same thing in D? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Regan Heath | On Monday, 10 November 2014 at 10:21:34 UTC, Regan Heath wrote:
> 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
It's right, it's just a good idea for D.
I love D ,and hope it 'the user code stays simpler, cleaner and easier to work with.'.
Thank you.
Frank
|
November 10, 2014 Re: 'partial' keyword in C# is very good for project ,what's the same thing in D? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Regan Heath | On 2014-11-10 11:21, Regan Heath wrote: > 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. Template mixins can be used instead. Looks a lot better. -- /Jacob Carlborg |
November 10, 2014 Re: 'partial' keyword in C# is very good for project ,what's the same thing in D? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | One requirement for a partial alternative is, that the generated coding can access private member of the actual class as they are in most GUI framework private members of the class.
class Example
{
private Button b;
private ComboBox cb;
}
The GUI framework takes care about calling their constructors and also about persisting their design time values (values you read and write in the GUI builder).
Is there any possibility to access private members by using Template Mixins?
As far as I can see only String Mixins are able to access private members of the scope they are inserted to.
Kind regards
André
On Monday, 10 November 2014 at 14:38:58 UTC, Jacob Carlborg wrote:
> On 2014-11-10 11:21, Regan Heath wrote:
>
>> 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.
>
> Template mixins can be used instead. Looks a lot better.
|
November 10, 2014 Re: 'partial' keyword in C# is very good for project ,what's the same thing in D? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Regan Heath | 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@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.
|
Copyright © 1999-2021 by the D Language Foundation