Live data from Hacker News

3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup

stroustrup.com

81–90 of 231 posts

Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup

#82

I'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…

Scott Meyers’ “Effective C++” series are digestible reads that cover the corner cases a modern C++ developer might hit, as well as guidelines and best practices to keep from shooting yourself in the foot.

Those are starting to be pretty out-of-date. Proper C++23 code looks nowhere like code from Effective Modern C++ (published in 2014) just like you wouldn't expect C# or JS books from 2014 to be up-to-date with 2024 good practices - compare for instance Eloquent Javascript 1st edition (2011) and 4th edition (2024) : `let`, `const`, `use strict;` and a ton of other things taken for granted today weren't there.

Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup

#83
post #56

Earlier quoted context omitted.

For the better, with Qt there is QtCreator.

Not sure what you are trying to say here. Qt, the library, and QtCreator, the IDE, are completely separate products. You can use QtCreator without Qt and vice versa. Now, I'm pretty sure you know that, hence my confusion...

QtCreator helps with the learning curve as it‘s a very accessible IDE. One of the first IDEs I used in my career.

Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup

#84

Oh, he switched to QT for the GUI chapter. That's a significant change from FLTK. Should be well received as QT is popular in industry. Not sure how the learning curve will be affected.

I wonder what Stroustrup thinks about the Meta Object Compiler. In a way Qt is its own dialect of C++.

Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup

#85
Over the past year, I've completed most of the second edition. It truly is an amazing book that has helped me overcome many mental barriers I've faced with programming for years. The main reason for the reduced size of this edition is the removal of 'Part IV: Broadening the View.' This section, which covers additional topics such as text manipulation, numerical computing, and embedded systems, is now available online. The chapters have not been updated from the second edition, as the topics are still relevant and utilize C++11/14.

Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup

#86

Huh. 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.

Already teaching you about the maintainability of tightly coupling different parts of your system before you've even opened the book

It would have been awesome if that ISBN issue were an actual ISBN re-use issue. I've run into issues coupling my system's design to the assumption that ISBNs uniquely identify a single edition of a single book. The intent of ISBNs are to be unique, but mistakes are made and resellers lose track or straight up abuse some ISBNs.

Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup

#87

Earlier quoted context omitted.

The idea of using Rust for scripting is bizaar. I can understand not wanting to use Python for everything, but I see the problem being the 'use it for everything' not the language choice. Use the tool that excels at the job. There is no language that is good at everything.

Rust is cool now. Python is not cool anymore.

I think Python fell victim to the Peter Principle. It got promoted beyond its competence.

Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup

#88
post #17

I 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++.

Same. I really miss it. Not terribly long ago we had an app that has a client and server, both in c++. UI, API, everything was c++. It really felt like the universal language had arrived. I won't pretend everything was perfect as it wasn't, but work was fun and the high caliber of people who could work in that stack was a joy to work with. I've never had a more exciting lunch than when we got distcc running on our bl…

I guess the scarcity of cheap labour contributed to the demise of C++ in the applications world.

Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup

#89

Oh, he switched to QT for the GUI chapter. That's a significant change from FLTK. Should be well received as QT is popular in industry. Not sure how the learning curve will be affected.

All of the 4 AI coding assistants I've tried (claude3, gemini, gpt4, deepseek) used SFML for graphics when I asked them to code boids and game of life in C++. I'm wondering if that's because it's cross platform or that there's more code out there using SFML that these models got trained on? SFML seems relatively recent compared to Qt or even FLTK, so it seems kind of odd that there would be more SFML training data. It also seems odd that all 4 were in agreement here that SFML should be used for graphics in a C++ program.

Re: 3rd Edition of Programming: Principles and Practice Using C++ by Stroustrup

#90

Earlier quoted context omitted.

It took 30 minutes to cure you?!? One of the first things I did when I got my PiDP-11 which can run RSX-11M and the DEC fortran compiler. I spent many many hours programming in Fortran when I was in college and thought wow I could relive some of that, about 5 minutes in I was "okay, step slowly away from the console." :-)

There's a fun stream where tsoding decides to learn Fortran, and the instructions he's working from say to turn off implicit typing (ie write "implicit none"). He's familiar with modern languages with type inference and with C++ type deduction which is a similar idea to full blown inference - and so he has no reason to even guess what Fortran is going to do without that admonition and you can see he's not happy when…

I was teaching one of the local highschool kids how to program in C and they asked "So why does everybody use i,j, and k for their indexes in loops?"
Post reply on HN