dsimcha Wrote:
> == Quote from Nrgyzer (nrgy...@googlemail.com)'s article
> > Hello everyone,
> > I currently try to create a structure with a construtor, but I always get
> > the
> following messages:
> > Error: Foo.this constructors are only for class definitions
> > Error: constructor lisim.ls
bearophile Wrote:
> Strtr:
> > How much of an overhead is a call to a struct instance compared to a call
> > to a object?
>
> The situation is more complex than that. Structs don't have a pointer to the
> virtual table and monitor, that saves memory and time. Less memory saves you
> time if yo
Strtr:
> How much of an overhead is a call to a struct instance compared to a call to
> a object?
The situation is more complex than that. Structs don't have a pointer to the
virtual table and monitor, that saves memory and time. Less memory saves you
time if you have to allocate a large number
bearophile Wrote:
> grauzone:
> > > Struct constructors are probably the D2 feature I miss more in D1 :-)
> >
> > Why?
>
> During optimization phases I sometimes want to convert classes into structs,
> and then I want to allocate some of those struct instances on the heap and
> others on the s
grauzone:
> > Struct constructors are probably the D2 feature I miss more in D1 :-)
>
> Why?
During optimization phases I sometimes want to convert classes into structs,
and then I want to allocate some of those struct instances on the heap and
others on the stack. A struct constructor allows m
bearophile wrote:
dsimcha:
Struct constructors are D2 only. That said, you can fake them in D1 by
overloading static opCall:
Struct constructors are probably the D2 feature I miss more in D1 :-)
Why?
Bye,
bearophile
dsimcha:
> Struct constructors are D2 only. That said, you can fake them in D1 by
> overloading static opCall:
Struct constructors are probably the D2 feature I miss more in D1 :-)
Bye,
bearophile
On 01/11/2010 04:06 PM, Nrgyzer wrote:
Hello everyone,
I currently try to create a structure with a construtor, but I always get the
following messages:
Error: Foo.this constructors are only for class definitions
Error: constructor lisim.lsResult.lsResult.this special member functions not
all
== Quote from Nrgyzer (nrgy...@googlemail.com)'s article
> Hello everyone,
> I currently try to create a structure with a construtor, but I always get the
following messages:
> Error: Foo.this constructors are only for class definitions
> Error: constructor lisim.lsResult.lsResult.this special memb
Hello everyone,
I currently try to create a structure with a construtor, but I always get the
following messages:
Error: Foo.this constructors are only for class definitions
Error: constructor lisim.lsResult.lsResult.this special member functions not
allowed for structs
By compiling the follwi
10 matches
Mail list logo