Re: define methods apart

2010-12-20 Thread Christopher Nicholson-Sauls
On 12/19/10 06:52, spir wrote: > On Sun, 19 Dec 2010 03:37:37 -0600 > Christopher Nicholson-Sauls wrote: > >> On 12/18/10 07:19, spir wrote: >>> Hello, >>> >>> >>> I cannot find a way to define methods (I mean "member functions) outside >>> the main type-definition body: >>> >>> struct X {} >>>

Re: define methods apart

2010-12-19 Thread spir
On Sun, 19 Dec 2010 03:37:37 -0600 Christopher Nicholson-Sauls wrote: > On 12/18/10 07:19, spir wrote: > > Hello, > > > > > > I cannot find a way to define methods (I mean "member functions) outside > > the main type-definition body: > > > > struct X {} > > void X.say () {writeln("I say!");}

Re: define methods apart

2010-12-19 Thread Christopher Nicholson-Sauls
On 12/18/10 07:19, spir wrote: > Hello, > > > I cannot find a way to define methods (I mean "member functions) outside the > main type-definition body: > > struct X {} > void X.say () {writeln("I say!");} > ==> > Element.d(85): semicolon expected, not '.' > > Do I overlook anything, or is this

Re: define methods apart

2010-12-18 Thread Jonathan M Davis
On Saturday 18 December 2010 05:19:56 spir wrote: > Hello, > > > I cannot find a way to define methods (I mean "member functions) outside > the main type-definition body: > > struct X {} > void X.say () {writeln("I say!");} > ==> > Element.d(85): semicolon expected, not '.' > > Do I overlook an

Re: define methods apart

2010-12-18 Thread bearophile
spir: > Do I overlook anything, or is this simply impossible? Even if you find some trick to do it, it's not the D way. A language syntax is defined by its conventions too. Bye, bearophile

define methods apart

2010-12-18 Thread spir
Hello, I cannot find a way to define methods (I mean "member functions) outside the main type-definition body: struct X {} void X.say () {writeln("I say!");} ==> Element.d(85): semicolon expected, not '.' Do I overlook anything, or is this simply impossible? In the latter case, what is the pr