9 ms·
Talking with the inventor of C++ [video]
- AlbertCory 3y agoVivid memories of having to install a 3rd party package that turned C++ error messages into something at least vaguely comprehensible.
- deleted 3y ago[deleted]
- chihuahua 3y agoMany years ago (1990-2005), I remember using C++ and whenever there was an error in some piece of code that involved strings (what should be a basic, fundamental data type), the error message referred to some complicated template type like std::basic_string<blah blah> and the simplest error was a really long message. It seems that no attention was paid to usability.
- layer8 3y agoC and C++ distinguish between the language and its implementations (compiler plus runtime). Producing good error messages is the compiler's job, not the language's.
- ReactiveJelly 3y agoCool, what apt command installs the C++ spec and not g++?
- bluGill 3y agoClang would be my recommendation. Though once clang showed better error messages were possible g++ cleaned up and things a much better than 15 years ago.
- codethief 3y agoDepending on how the language works and what it allows you to do, your compiler's error messages can only be so helpful, though. I mean, imagine replacing "C and C++" in your message with "Brainfuck". Error messages would be guaranteed to be very low-level, so won't help you solve the actual higher-level problems.
- layer8 3y agoYes, but in the cited example of basic_string, providing useful error messages isn’t actually that hard. It would be more interesting to hear an argument about what specific C++ features make providing useful error messages hard (if indeed they do) for which precise reasons, that would warrant the accusation that the language designers (rather than he compiler writers) didn’t pay attention to usability.
- AlbertCory 3y agoIndeed. And the current generation of error messages is much improved, so clearly it was possible to do better.
- thechao 3y agoFor some unholy, around 2004, reason I wrote a template library that encoded all of the crystallographic groups as integer template arguments; I guess the idea was to allow automated mapping of any point in the unit cell to its canonical cell position. That'd let us compute crystallographic distances in something like O(log n) time, rather than O(n). (The usual way is to copy one of the points to every equivalent point in the unit cell, calculate every distance in all directions, and keep the minimum: 200+ distance calculations in the worst case; the copies were made via sequences of 4x4 matrix multiplies.) Anyways, I deployed this software, and someone had a misstep, and the error message crashed the mainframe. I relayed this story to Bjarne around 2006, and he didn't find it funny — just frustrating.
- hermitcrab 3y ago>the error message crashed the mainframe I remember how horrible templating error messages were in the early days of C++. They still aren't great.
- mianos 3y agoIt is not hugely different today when you have an error in a template. I had a one line error using a boost multi index container. It produced 1300 lines of errors. You do kind of get used to it.
- layer8 3y agoSTLFilt, probably. https://www.bdsoft.com/tools/stlfilt.html https://www.bdsoft.com/tools/stlfilt.html
- AlbertCory 3y agosounds right
- taspeotis 3y ago> Includes the "Proxy" CL compiler, multi-platform-aware STLTask tray-resident control utility (screen shot) That screenshot was a wild ride. WS_FTP!
- _a_a_a_ 3y ago[video] please
- maroonblazer 3y agoThe '(youtube.com)' immediately following the title gives it away.
- _a_a_a_ 3y agoYessssss. Thank you. There is an HN convention though.
- deleted 3y ago[deleted]
- RandomWorker 3y agoThe fact that this video has less than 1000 views is insane. Probably not likely to stay this way now it hit the front page. However the audio is quite poor.
- deleted 3y ago[deleted]
- jdlyga 3y agoOne of the biggest misconceptions in programming is that coding in C++ is nightmarishly hard. I’ve been working in C++ professionally for close to 15 years (though my current role is Python). I’ve done graphics, UI, backend systems, low level bits and bytes concurrency laden code, you name it, and I can attest to it not being so bad. In many ways, it can even be easier than Python when working with more complex and nested codebase because it’s so flexible yet so expressive. C++ is a big, complex language and learning all of its intricacies like many C++ classes nowadays teach is daunting. And that’s where I believe the problems lie. You don’t need to know everything about C++ to start working with it day to day, just the fundamentals. Remember, it was the first language taught to older millennials for a reason.
- beached_whale 3y agoI really enjoy programming in C++, but agree on knot being able to know all of it. It’s just not necessary to know it all. I think this comes with programmer experience too, learning to learn what one needs to know right now along with some very high level of whats available goes a long way. Then when one needs to reach elsewhere, they have an idea of where to go, but none of the details yet. But knowing how to program also means that a large chunk of the problem of using the best language for the job is easier. Doing it idiomatically though, that takes work, but at least knowing the questions is a big start.
- jebraat 3y agoIMO C/C++ are great languages if you learn how memory and pointers etc. work. The tooling on the other hand is horrendous when you compare it to other languages like Rust.
- zik 3y agoYou don't really need to do much explicit memory handling in modern C++ - smart pointers feel similar to garbage collected languages like Java or Go, with the occasional extra '*' I guess. Comparing language tooling to Rust is surely controversial when compiles in Rust take an order of magnitude longer than any other language. Sure, Rust's tooling has some nice features but let's not ignore this very important elephant in the room.
- febra_ 3y agoThat youtube channel surely is a.. ride. Makes me question the legitimacy of these videos
- ATMLOTTOBEER 3y agoI find this interviewer overbearing
- KenArrari 3y ago[flagged]
- synergy20 3y agoI have been trying newer languages these two years(rust,zig,nim,golang,dart) and I'm more than ever firmly believe c and (modern) c++ are all I need to get job done, fast. The ecosystem, the no-FFI-needed reuse of so many libraries, books and tutorials, are just too valuable, yes c/c++ are not perfect but I failed to find things better. MISRA's new c++ and c books are great to help me to write safe code as well.
- winrid 3y agoDo you use a package manager?
- synergy20 3y agonot really,I use make or cmake
- aldanor 3y agoSeriously hard to tell if this comment is sarcasm or not.
- synergy20 3y agoit's not sarcasm, neither do satellites and rockets are running c++ :)
- aldanor 3y agoSatellites and rockets and not "running c++". They are running compiled machine code, that may have been written in any language. For satellites and rockets in particular, similar to other embedded systems, most of them have the software written in C, which makes sense. C++ doesn't have much to do with it.
- pknerd 3y agoThe side bar suggested this old video of him: Bjarne Stroustrup: Why I Created C++ | Big Think https://www.youtube.com/watch?v=JBjjnqG0BP8 https://www.youtube.com/watch?v=JBjjnqG0BP8
- iso8859-1 3y agoWhy are you reposting the sidebar contents? Can you vouch for it?
- DaveSchmindel 3y agoWhat qualities should this comment have to vouch for? The art style of the linked video? The accuracy of its content? Should we ask OP if they vouch for the video that started this thread?
- ChrisMarshallNY 3y agoI’m a big believer in the right tool, for the right job. I used C++ for many years, as a primary development language for MacOS apps (MPW and CodeWarrior -mostly CodeWarrior). I happily switched to Cocoa and ObjC, and it’s been Swift, for many years. But I also write GUI end-user interface apps. At the company I worked for, we used C++ to write image processing pipeline engines, and would install the engine in apps for Windows and Mac, which were written in C# or ObjC (my company had not switched to Swift, by the time we left). Our team consisted of a number of highly experienced (like 30 years of coding, experienced) engineers, and they did a great job with C++. It can present difficult-to-fix bugs, but that’s because of the type of tool it is. I think of C++ as an “engine” tool. It’s best used to create “faceless” libraries and SDKs (IMO). In that context, it basically has no peer.
- hermitcrab 3y agoI learnt C++ in the 90s. I internalized the various gotchas and learned to use a relatively safe and expressive subset of the language. I'm still programming in C++ now and (I'm slightly ashamed to say) haven't bothered to keep up with all the new features. I keep meaning to make the time, but there is always higher priority stuff to do. I use foreach plus the occasional lambda and auto type. What have I been missing?