I've watched a number of Bjarne Stroustrup presentations, and this is a particularly interesting one. It's interesting to hear him talk about the cost of abstractions, and when and where to spend that cost. Shame about the audio in some sections (somebody link a clean version if it's out there), but it's worth persevering.
Sheet 16: for 8-bit chips probably stick to assembler - bullocks! The C++ style that is appropriate for small 32-bot Cortexes is perfect for 8-bit AVRs too. And for ancient chips like PICs and 8051 a C-dialect is more appropriate than assembler.
44:40: And there you run headlong into a limitation of C++. That code is bad, and it cannot be made good. The problem is that the return value of fclose() is not checked. Personally, I treat fclose() failure as a write failure (so if it happens in a read stream I don't care, but on a write stream I have to assume the file wasn't written correctly). Now, ~File_handle() cannot return an error code, and it should not throw an exception (or else, if the file is destroyed because of an exception, this itself causes undefined behavior). So there is nothing that ~File_handle() can do to signal failure. So the failure gets silently ignored, and the file is corrupted.
What a great talk but why do so many talks have glitchy mics...Didn't we figure this out decades ago?
I've watched a number of Bjarne Stroustrup presentations, and this is a particularly interesting one.
It's interesting to hear him talk about the cost of abstractions, and when and where to spend that cost.
Shame about the audio in some sections (somebody link a clean version if it's out there), but it's worth persevering.
I hesitated giving a thumbs up because it meant incrementing 512 upvotes.
Audio is broken
Nice talk. Thanks for uploading!
C++ #numbawan!
Sheet 16: for 8-bit chips probably stick to assembler - bullocks! The C++ style that is appropriate for small 32-bot Cortexes is perfect for 8-bit AVRs too. And for ancient chips like PICs and 8051 a C-dialect is more appropriate than assembler.
The firmware of the remote control was written in (Embedded)C++ - i presume? ;-)
44:40: And there you run headlong into a limitation of C++. That code is bad, and it cannot be made good. The problem is that the return value of fclose() is not checked. Personally, I treat fclose() failure as a write failure (so if it happens in a read stream I don't care, but on a write stream I have to assume the file wasn't written correctly). Now, ~File_handle() cannot return an error code, and it should not throw an exception (or else, if the file is destroyed because of an exception, this itself causes undefined behavior). So there is nothing that ~File_handle() can do to signal failure. So the failure gets silently ignored, and the file is corrupted.
well that is why there is Core Guidelines. Everything will still depends on the hands of a programmer regardless of what PL he will use.
What about mechatronics engineers,do they have a chance?
ohy yes, of course
buy an effing de-esser, you're ruining every one's ears
and this de-esser will probably be written in C++...
I just noticed there are no girls there.
Too busy working on the standard library
@@zanityplays so that lame people like you can write better code
Yes, because there are people like you here.
@@anokhias Exactly.
C++ will never replace c even if they generate the same assembly code