[Issue 9112] Uniform construction for built-in types
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Dec 6 16:55:17 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9112
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Uniform default |Uniform construction for
|construction |built-in types
--- Comment #8 from Kenji Hara <k.hara.pg at gmail.com> 2012-12-06 16:55:04 PST ---
I agree with Jonathan. `new immutable int(1)` is also necessary, otherwise we
cannot initialize heap-allocated value without type-system hacking (by using
cast). I think it is one of hole in current const type system.
Therefore, for all built-in types, both stack allocating syntax (T() and T(v))
and heap allocating syntax (new T() and new T(v)) should be supported. I
changed the summary.
But, true uniform construction cannot be implemented currently, because array
construction has some special cases.
I've opened a new issue for uniform array construction.
Issue 9120 - Uniform construction for array types
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list