3 ms·
And the guys that implement smart pointers are what, exactly? Uberprogrammers? Is there a certificate to get into that club? What about compiler authors, that d
by choeger 7y ago
And the guys that implement smart pointers are what, exactly? Uberprogrammers? Is there a certificate to get into that club? What about compiler authors, that deal with, gasp, optimizations of these bare pointers? Kernel developers? Embedded system engineers?
It is ok to stay above a certain level of abstractions consciously, but stating that one cannot go below safely is just steadying mediocrity.
- lmm 7y ago> And the guys that implement smart pointers are what, exactly? Uberprogrammers? Is there a certificate to get into that club? What about compiler authors, that deal with, gasp, optimizations of these bare pointers? Kernel developers? Embedded system engineers? One cannot do any of those things safely by hand. Compilers, kernels, and embedded systems do indeed do these things; they also have bugs.
- choeger 7y agoYou are contradicting yourself. If one cannot do these things safely by hand, then noone can implement the automatic abstractions either.
- rcxdude 7y agoYou cannot safely control an internal combustion engine's valve timings by hand, but it is clearly possible to implement this automatically (and fairly simply). Some things are much easier for machines to do than humans, even though the machines are designed and build by humans.
- pjmlp 7y ago> Is there a certificate to get into that club? There is and the large majority fails at it, as proven by the CVE database, in spite the rigorous process to contribute code to the Linux kernel for example.
- choeger 7y agoI call bullshit. And arrogant bullshit at that. The wast majority of bare metal components is highly functional and relatively bug free.
- pjmlp 7y agoYou can call whatever you like, CVE database, yearly security reports, and OS release notes from all major OSes provide the necessary facts. Sadly liability still isn't a thing on software development.
- rcxdude 7y agoThat's not the point. Smart pointer implementations aren't some dark magic, they're just the opposite: mostly fairly simple to implement (shared_ptr is a little trickier), and obviously right by construction: the compiler does the hard work of making sure the constructors and destructors get called appropriately (and this is a little harder but still far far easier than making sure that malloc() and free() match in all actual uses).