digitalmars.D - State of std.container redesign
- David Nadlinger (7/7) Mar 30 2011 If I remember correctly, Andrei proposed a redesign of std.container
- Jonathan M Davis (5/12) Mar 30 2011 The main thing was that all of the containers would become classes rathe...
- Ishan Thilina (3/6) Mar 30 2011 Hi, I'm the one who is interested in the GSoC project "Containers". Shou...
- Steven Schveighoffer (6/16) Mar 30 2011 Most definitely final classes. I think Andrei has already decided to
- Andrei Alexandrescu (5/22) Mar 30 2011 That is correct. We're looking for classes, preponderently final
- Jonathan M Davis (8/15) Mar 30 2011 They should all be final classes. It was already the design that all con...
- Andrei Alexandrescu (4/11) Mar 30 2011 Yes, the idea is to use classes instead of structs. That simplifies
If I remember correctly, Andrei proposed a redesign of std.container here on digitalmars.D not too long ago, which included switching to final classes for container types. However, I can't quite remember the outcome of the discussion, and there don't seem to be any related changes by now. Is this idea simply pending implementation, or did you change your mind on this, Andrei? David
Mar 30 2011
On 2011-03-30 06:15, David Nadlinger wrote:If I remember correctly, Andrei proposed a redesign of std.container here on digitalmars.D not too long ago, which included switching to final classes for container types. However, I can't quite remember the outcome of the discussion, and there don't seem to be any related changes by now. Is this idea simply pending implementation, or did you change your mind on this, Andrei?The main thing was that all of the containers would become classes rather than structs which used reference counting. RedBlackTree has already been changed (in git), but the others haven't been yet. - Jonathan M Davis
Mar 30 2011
The main thing was that all of the containers would become classes rather than structs which used reference counting. RedBlackTree has already been changed (in git), but the others haven't been yet.Hi, I'm the one who is interested in the GSoC project "Containers". Should the containers that I ( or anyone who gets eligible to do the project ) implement be based on structs or classes?
Mar 30 2011
On Wed, 30 Mar 2011 13:52:29 -0400, Ishan Thilina <ishanthilina gmail.com> wrote:Most definitely final classes. I think Andrei has already decided to change the existing ones to classes, and RedBlackTree already is a class in the source tree (not yet in the released version). -SteveThe main thing was that all of the containers would become classes rather than structs which used reference counting. RedBlackTree has already been changed (in git), but the others haven't been yet.Hi, I'm the one who is interested in the GSoC project "Containers". Should the containers that I ( or anyone who gets eligible to do the project ) implement be based on structs or classes?
Mar 30 2011
On 3/30/11 1:07 PM, Steven Schveighoffer wrote:On Wed, 30 Mar 2011 13:52:29 -0400, Ishan Thilina <ishanthilina gmail.com> wrote:That is correct. We're looking for classes, preponderently final classes. Emphasis is not on hierarchy due to the many possible characteristics of containers, but instead on name conformance. AndreiMost definitely final classes. I think Andrei has already decided to change the existing ones to classes, and RedBlackTree already is a class in the source tree (not yet in the released version). -SteveThe main thing was that all of the containers would become classes rather than structs which used reference counting. RedBlackTree has already been changed (in git), but the others haven't been yet.Hi, I'm the one who is interested in the GSoC project "Containers". Should the containers that I ( or anyone who gets eligible to do the project ) implement be based on structs or classes?
Mar 30 2011
On 2011-03-30 10:52, Ishan Thilina wrote:They should all be final classes. It was already the design that all container types should have reference semantics, but Andrei tried to implement them initially as structs with reference semantics using ref counting, and that ran into problems, so it was decided to just make them all final classes. That way, inlining is still possible (thanks to final), and they're quite clearly reference types. - Jonathan M DavisThe main thing was that all of the containers would become classes rather than structs which used reference counting. RedBlackTree has already been changed (in git), but the others haven't been yet.Hi, I'm the one who is interested in the GSoC project "Containers". Should the containers that I ( or anyone who gets eligible to do the project ) implement be based on structs or classes?
Mar 30 2011
On 03/30/2011 08:15 AM, David Nadlinger wrote:If I remember correctly, Andrei proposed a redesign of std.container here on digitalmars.D not too long ago, which included switching to final classes for container types. However, I can't quite remember the outcome of the discussion, and there don't seem to be any related changes by now. Is this idea simply pending implementation, or did you change your mind on this, Andrei? DavidYes, the idea is to use classes instead of structs. That simplifies implementation a fair amount. Andrei
Mar 30 2011