Andrei Alexandrescu <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #5 from Andrei Alexandrescu <> 2010-09-11 
09:57:21 PDT ---
(In reply to comment #4)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > Also, since when are structs allowed to be allocated on the heap? TDPL
> > > explicitly states that structs have scoped lifetime.
> > 
> > I double TDPL says this. And if it says so, then it's wrong. TDPL is not a
> > religious book.
> > 
> It's not a religious book, but since the D docs aren't kept up to date, who 
> can
> you trust? And AFAIK Andrei & Walter have both reviewed TDPL and agree with
> what it states there. As for structs on the heap, I simply didn't know it was
> possible to do that, so maybe I judged to quickly from what I've read. 
> Whether it's legal or not is not up to me, so don't take it personal please. 
> :)

Obviously there are many ways to allocate struct objects on the heap: using
new, as members of class objects, or as elements of arrays. All of them are
described in TDPL. If some particular sentence of TDPL seems to rule out such
possibilities please let me know.

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

Reply via email to