std.container and classes
Jonathan M Davis
jmdavisProg at gmx.com
Tue Dec 13 19:08:05 PST 2011
Is the plan for std.container still to have all of its containers be final
classes (classes so that they're reference types and final so that their
functions are inlinable)? Or has that changed? I believe that Andrei said
something recently about discussing reference counting and containers with
Walter.
The reason that I bring this up is that Array and SList are still structs, and
the longer that they're structs, the more code that will break when they get
changed to classes. Granted, some level of code breakage may occur when we add
custom allocators to them, but since that would probably only affect the
constructor (and preferably wouldn't affect anything if you want to simply
create a container with the GC heap as you would now were Array and SList
classes), the breakage for that should be minimal.
Is there any reason for me to not just go and make Array and SList final
classes and create a pull request for it?
- Jonathan M Davis
More information about the Digitalmars-d
mailing list