D - forward references
- Pavel Minayev (8/8) Dec 15 2001 Their implementation in D seems unclear to me.
- Walter (5/13) Dec 16 2001 They're for if you really do want to create a library with a hidden
Their implementation in D seems unclear to me.
On one hand, they are allowed - at least in alpha:
int function(int n); // works!
On other hand, they don't serve any practical meaning -
D doesn't need them anyhow, and there is no way
to define a body once the prototype was declared:
int function(int n) { } // symbol conflict
So what are they for?
Dec 15 2001
"Pavel Minayev" <evilone omen.ru> wrote in message
news:9vgete$138v$1 digitaldaemon.com...
Their implementation in D seems unclear to me.
On one hand, they are allowed - at least in alpha:
int function(int n); // works!
On other hand, they don't serve any practical meaning -
D doesn't need them anyhow, and there is no way
to define a body once the prototype was declared:
int function(int n) { } // symbol conflict
So what are they for?
They're for if you really do want to create a library with a hidden
implementation of the functions. The way to do it would be make a copy of
the module, and delete the function bodies.
Dec 16 2001








"Walter" <walter digitalmars.com>