To avoid resource leak when porting legacy code most time we have to create several micro classes using RAII idom. To prevent the proliferation of these micro classes we could optionally use lambda expressions.
Sure, but now instead of a class, every time you use init_device() you have to remember to queue up a lambda that calls close_device(), and you have to get it right every time use that function, while a class you can write correctly once and forget about it.