Re: questions on class definitions and mixins

2014-02-11 Thread Jakob Ovrum
On Monday, 10 February 2014 at 15:35:00 UTC, Patrick D. Jeeves wrote: One thing I've been trying to figure out is how to do the following in D: class foo { string bar(); }; void foo::bar() { return "hello world!"; } From what I can gather constructs like this just aren't allowed in D

Re: questions on class definitions and mixins

2014-02-11 Thread Gary Willoughby
On Monday, 10 February 2014 at 15:35:00 UTC, Patrick D. Jeeves wrote: From what I can gather constructs like this just aren't allowed in D, but I don't understand why, can anyone explain it please? http://wiki.dlang.org/DIP47 There is a threadnaught related to the above DIP somewhere. I perso

Re: questions on class definitions and mixins

2014-02-11 Thread bearophile
Adam D. Ruppe: It just wasn't there but there's some people who think it would be a good idea to add (including Walter I think) so it might be in later. It increases the syntactic variance of D code, and people coming from C++ will go using it straight (and not just in the uncommon cases di

Re: questions on class definitions and mixins

2014-02-11 Thread Andrea Fontana
On Monday, 10 February 2014 at 15:41:06 UTC, Adam D. Ruppe wrote: On Monday, 10 February 2014 at 15:35:00 UTC, Patrick D. Jeeves wrote: [...] Is this because it isn't possible to do such things, or because it would be rather pointless to do so compared to simpler approaches, (in this case call

Re: questions on class definitions and mixins

2014-02-11 Thread Stanislav Blinov
On Monday, 10 February 2014 at 15:35:00 UTC, Patrick D. Jeeves wrote: One thing I've been trying to figure out is how to do the following in D: class foo { string bar(); }; void foo::bar() { return "hello world!"; } From what I can gather constructs like this just aren't allowed in D

Re: questions on class definitions and mixins

2014-02-11 Thread Adam D. Ruppe
On Monday, 10 February 2014 at 15:35:00 UTC, Patrick D. Jeeves wrote: From what I can gather constructs like this just aren't allowed in D, but I don't understand why, can anyone explain it please? It just wasn't there but there's some people who think it would be a good idea to add (including

questions on class definitions and mixins

2014-02-11 Thread Patrick D. Jeeves
One thing I've been trying to figure out is how to do the following in D: class foo { string bar(); }; void foo::bar() { return "hello world!"; } From what I can gather constructs like this just aren't allowed in D, but I don't understand why, can anyone explain it please? I know th