|
|
|
|
|
by CCs
4736 days ago
|
|
It depends on the use case. Sometimes you need performance or there are other constraints, in which case your choice of language is very limited. Automated memory management works, but not all the time.
And how about other resources? How you make sure your mutex gets released? Add a comment "please don't forget to release this one"?
How about file handle, temporary file, serial port, DMA, GPU, network port and other limited resources? BTW, I think most of the brightest minds you mention use C or C++ on daily basis. :) |
|
[citation needed]
"BTW, I think most of the brightest minds you mention use C or C++ on daily basis"
I doubt it. Most of the brightest minds I have met, at least in academia, use high-level languages: Python, OCaml, Lisp, Haskell, etc. They have more important things to worry about than whether or not it is safe to deallocate objects.