|
|
|
|
|
by jesse__
147 days ago
|
|
Another commentor succinctly pointed out one argument against RAII+friends is that it encourages thinking about single objects, as opposed to bulk processing. In many contexts, the common case is in fact bulk processing, and programming things with the assumption that everything is a single, discrete element creates several problems, mostly wrt. performance, but also maintainability. [1][2] > The whole point of an arena allocator is the exact opposite of RAII Yes, agreed. And the internet is rife with people yelling about just how great RAII is, but comparatively few people have written specifically about it's failings, and alternatives, which is what I'm asking about today. [1] https://www.youtube.com/watch?v=tD5NrevFtbU [2] https://www.youtube.com/watch?v=rX0ItVEVjHc&t=2252 |
|