Has the ban on returning function nested structs been lifted?

so so at so.so
Fri Mar 18 14:54:52 PDT 2011


On Fri, 18 Mar 2011 22:25:49 +0200, Andrej Mitrovic  
<andrej.mitrovich at gmail.com> wrote:

> Can auto functions with local types work if you're distributing your
> library in binary form (.lib) and only .di interface files?

As much as i love to have it (IMO a big issue for library design in  
general) i am afraid it is not possible because of dynamic libraries.
If only we could expose only the parts we want, with zero overhead (I  
don't know, maybe it is already possible somehow). There is not a single  
elegant solution in the languages i know.

--- di file
struct A {
// imposter A {
	method1
	method2
}

--- d file
struct A {
	method1
	method2

	method3
	...

	// data
	int a, b, c;
}


More information about the Digitalmars-d mailing list