Weed wrote:
Denis Koroskin пишет:

I'd suggest you to state you ideas as simple and keep your posts as
small as possible (trust me, few people like reading long posts).

The extra-short formulation of my idea:
Objects should be divided on POD (struct) and non-POD (class).

Instead of such division as now: POD && value type (struct) and POD &&
reference type (class).

The reference versus value type difference is just a matter of defaults.

Returning a class instance on the stack from a function is possible with inout parameters, though you can't use a constructor in that case:

void main ()
{
        scope MyClass obj = new MyClass;
        foo (obj);
}

void foo (inout MyClass obj)
{
        // initialize obj somehow
}

Reply via email to