Code fails with linker error. Why?
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Oct 4 08:54:13 PDT 2014
On Sat, 04 Oct 2014 15:29:55 +0000
John Colvin via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
wrote:
> I don't really see the point though.
>
> class A
> {
> void foo(int a) { Afoo(this, a); }
> }
>
> then declare and define Afoo however you like.
it's noisy hackery and namespace pollution. sure i can do this and i'm
using this trick when it's better to define some methods for
class/struct in another module, but i don't like it.
inheritance/interfaces is not the best solution sometimes.
sure, i can `import()` any text file, but this is not good for separate
compilation (and this is why i want this feature in the first place).
to make a long story short: i don't like such hacks. ;-) but i'm not
yet familiar with compiler internals enough to write a patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20141004/baf47f1b/attachment.sig>
More information about the Digitalmars-d-learn
mailing list