digitalmars.D.bugs - [Issue 10535] New: Add a function to druntime which returns an empty AA
- d-bugmail puremagic.com (27/27) Jul 03 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10535
- d-bugmail puremagic.com (14/14) Jul 03 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10535
- d-bugmail puremagic.com (13/19) Aug 17 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10535
http://d.puremagic.com/issues/show_bug.cgi?id=10535 Summary: Add a function to druntime which returns an empty AA Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: druntime AssignedTo: nobody puremagic.com ReportedBy: jmdavisProg gmx.com PDT --- Right now, the only way to get an empty AA (as opposed to a null one) is to add an element to it and then remove it, which is neither user-friendly, nor efficient. It would be easy enough to create a function which at least wrapped all that (creating the AA, adding the element, and then removing it), but it would be more efficient if the AA implementation did it, since it should be able to do it without having to add or remove an element. It would also be possible for the AA implementation to do it without using the init property (as adding and then removing an element would likely require the init property in order to get an element to add). So, this enhancement request is for adding a function to druntime which returns an empty AA without actually adding or removing elements from the AA to do it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 03 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10535 monarchdodra gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra gmail.com Not to hijack this, but before we add that AA specific function, we should take into account that a LOT of other objects require this. Basically, every reference semantic object in Phobos: Containers, Appender, PRNGs... There might be a better "generic" solution to the "empty initialization" (eg: "arg-less-constructor") problem. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 03 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10535 hsteoh quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh quickfur.ath.cxNot to hijack this, but before we add that AA specific function, we should take into account that a LOT of other objects require this. Basically, every reference semantic object in Phobos: Containers, Appender, PRNGs... There might be a better "generic" solution to the "empty initialization" (eg: "arg-less-constructor") problem.This does not preclude adding a function to aaA.d that returns an empty but non-null AA, since that will be needed anyway no matter what generic solution is provided to the end-user. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 17 2013