On Wed, Dec 11, 2013 at 10:50 AM, Benoit Jacob <jacob.benoi...@gmail.com>wrote:

> 2013/12/10 Robert O'Callahan <rob...@ocallahan.org>
>
>> Keep in mind that proliferation of different types for the same
>> functionality hurts developer productivity in various ways, especially
>> when
>> they have quite different APIs. That's the main reason I'm not excited
>> about widespread usage of a lot of new (to us) container types.
>>
>
> For the same reason as described above, I believe that adopting STL
> containers is the solution, not the problem! The STL shows how to design
> containers that have a sufficiently similar API that, in most cases where
> that makes sense (e.g. between a map and an unordered_map), you can switch
> containers without having to adapt to a different API.
>

I'm not a fan of the STL's approach of making every data structure feel
like an array. It leads to nonsense like the erase-remove idiom. A remove
function that doesn't actually remove anything, now that's a footgun :-).

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to