Summary: Default struct constructors needed
           Product: D
           Version: future
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from Max Samukha <> 2010-02-25 02:19:18 
PST ---
Qt has quite a lot of types with pass-by-value semantics. For example, all COW
types are value types

Currently, QtD implements such types as classes, which implies an excessive
heap allocation happens every time a value of such a type is passed to D.

We are trying to solve this problem by wrapping Qt's value types in D structs.
Those structs must always be properly initialized via a call to Qt. It would be
incorrect to just declare a variable like this:

QString s;

We would have to force the programmer to explicitly run a function emulating
the default constructor (e.g. opCall), or expect him to suffer badly when he
forgets to do so.

Possible solutions:

1. Implement proper default constructors for structs.
2. Make it possible to forbid the use of uninitialized structs.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to