Ion Gazta?aga
El 23/08/2014 20:53, Joaquin M Lopez Munoz escribi?:
A container that is not a sequence, unordered but not associative. unordered_collection might be an alternative name.
Oy vey.
This name misses the critical feature that elements are polymorphic.
Why use collection rather than container? poly_container.
An interesting addition to Boost.Container?
If I had the time :-/ I' ve been considering working a little more on this to turn the initial sketch into something resembling a full-fledged container, but it'd take me some days' work I don't have.
I couldn't sleep for a while last night and my thoughts turned to this subject. I had thought this was an interesting (birds of a feather) idea and then realized it would also be helpful from a serialization perspective. Rather than having to marshal a type identifier before each instance, you could (iiuc) marshal a type identifier and how many instances will follow. Something like Derived_1_type_id 50 Derived_2_type_id 77 So it would reduce the serialization overhead compared to other containers. I think it's a good idea and look forward to seeing it developed further. -- Brian Ebenezer Enterprises - In G-d we trust. http://webEbenezer.net