|
|
|
|
|
by adrian_b
884 days ago
|
|
Thanks for the explanation. I agree that this is pretty much equivalent to RAII. Nevertheless, it is also obvious that this was not a source of inspiration for Bjarne Stroustrup. He has started directly from the constructors and destructors of C.A.R. Hoare (1965-11) and Simula 67 (1968-05, Kristen Nygaard & Ole-Johan Dahl). The only change is that in 1980 he has enhanced his compiler for "C with Classes" to generate automatically all the invocations to the appropriate destructors in all the block and function epilogues, relieving the programmer from this task. |
|