I love this book. I wish other languages had something similarly held in high regard to provide some touchstone. Is there something like this for Rust?
3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup
21–30 of 231 posts
Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup
#22I miss my days working with C++. It's moved further down the development stack than where it used to be. We used to handle UI, API parsing, and pretty much everything using C++.
Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup
#23Huh. The ISBN shown at the top of the page (currently "9780136816485") appears to be incorrect. That seems to be the ISBN for "A Tour of C++" from 2022. The ISBN for this book is, according to the Amazon product page[1], "9780138308681". [1]: https://www.amazon.com/Programming-Principles-Practice-Using... Edit: emailed Mr. Stroustrup and he just replied to say that the bad ISBN has been corrected.
Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup
#24I miss my days working with C++. It's moved further down the development stack than where it used to be. We used to handle UI, API parsing, and pretty much everything using C++.
Where I am, we still do!
Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup
#25I've always wanted to learn C++. I have a great handle on C#, making large applications and architectures as well as legacy refactoring in C#, and I would love to learn C++. I recently started at a company with a bit of a hairy c++ application that I would love to refactor or understand more thoroughly. Is this book a good place. Note that I have read a very basic book on C++ much more learning programming book, but…
Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup
#26I've always wanted to learn C++. I have a great handle on C#, making large applications and architectures as well as legacy refactoring in C#, and I would love to learn C++. I recently started at a company with a bit of a hairy c++ application that I would love to refactor or understand more thoroughly. Is this book a good place. Note that I have read a very basic book on C++ much more learning programming book, but…
Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup
#27Sharing the C++ Annotations here, which is a continiously updated book on modern C++. http://www.icce.rug.nl/documents/cplusplus/
If I just use C with classes, plus smart pointers and auto, for my emulator project(s), would that be a reasonably good approach? I once heard that the C++ language contains 4 components: the first catalog is "C", the second is for OOP, the third is for productivity and flexibility such as stl and templates, and the last one is for special cases such as volatile, asm, etc. He then recommends to use catalog 1 with car…
This is fine if you do not plan to share your work with others, but it's not well-written C++. It will bite you later on. It's best to learn the C++ way of doing things. It will save you so much time and headache. Don't use character arrays, use strings. Don't use C arrays, use std::vector or std::array. Don't write your own lists or sets, use std::list/set or std::unordered_list/set. Don't use strcat when std::string operator + exists. Etc.
I personally rarely use smart pointers or make_shared/make_unique these days. I just don't need pointers. Most of the time allocation can be done without them, and when I need to pass things around I use references. There are exceptions for C APIs for cross-platform/cross-compiler work, of course. And sometimes library code needs it, ofc.
The STL and are your friend. They solve so many problems in a very elegant way. Learning them should be a priority.
I'd go easy on the OOP elements unless you know OOP programming very well. Just using classes as containers for data and functions is more than fine for C++ most of the time.
Writing your own templates can be a bit of a footgun until you understand them. Feel free to put that off awhile.
Don't mess with volatile and asm unless you are 100% sure that what you're doing needs it.
Also: Be cautious with use of auto. A bit here and there is fine, but too much and code can become unreadable. C++ is a typed language for a reason.
Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup
#28I miss my days working with C++. It's moved further down the development stack than where it used to be. We used to handle UI, API parsing, and pretty much everything using C++.
Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup
#29Earlier quoted context omitted.
Link works for me (firefox 125), but only if I use http (port 80), port 443 get me 404 not found as well.
Ah, you're right. The issue is the link switching from http to https (even though the supplied link is http) and Chrome making it difficult (by default) to see whether http or https is being used. If I just copy/paste the link it works fine in Chrome and Edge but clicking on the link they both switch it to https. Brilliant. Just tested, works fine with Safari (mobile, but desktop usually has the same behavior).
Chrome's attempt to use a secure connection resulting in 404 while the actual link works fine isn't great. But it's understandable and the TLS-first assumption the're using probably works just fine in the other 99.999% situations.
If only they'd taken the time to copy the http config and setup let's encrypt or cert from GEANT Vereniging CA apparently preferred by rug.nl...
Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup
#30I miss my days working with C++. It's moved further down the development stack than where it used to be. We used to handle UI, API parsing, and pretty much everything using C++.