5 ms·
It impresses that age has not meant better tooling for C/C++ when compared with more modern languages. I really envy productivity people using more "dynamic" l
by marcodiego 5y ago
It impresses that age has not meant better tooling for C/C++ when compared with more modern languages.
I really envy productivity people using more "dynamic" languages have had over C/C++ developers just because of tooling. Of course, each language is like a tool tailored for a more adequate domain and I'm sure better tooling wouldn't magically fix all of old languages' traps. Nevertheless I miss it.
- The_rationalist 5y ago
- pjmlp 5y agoNot using C++ Builder, Visual Studio or Clion? I should also note there used to exist some great tooling that failed in the market, because they were too soon with heavy hardware requirements. Energize C++ and Visual Age for C++ version 4.
- marcodiego 5y agoI wouldn't consider C++ Builder as C++. Have not used it in ages, but last time I used it, it was not C++. Anyway, that's is not exactly what I was talking about. I think even the tools you listed lacked years behind useful features that eclipse and netbeans implemented for java like refactoring. I'm glad there are good front-ends to the llvm language server though and that static analyzers are slowly improving and becoming more popular even to the sporadic hobbyist.
- pjmlp 5y agoC++ Builder compiles C++, thus it is C++. I will never understand why clang and GCC extensions are considered part of C or C++, while other compilers aren't. Refactoring exists for 20 years in Visual Studio with plugins like Visual Assist. The tools I mentioned as ahead of their time allowed for a Lisp Machines or Smalltalk like experience for C++, respectively.
- marcodiego 5y ago> C++ Builder compiles C++, thus it is C++. By your definition. > I will never understand why clang and GCC extensions are considered part of C or C++, while other compilers aren't. Didn't say so. > Refactoring exists for 20 years in Visual Studio with plugins like Visual Assist. That one is new for me. Didn't know it. Would love to have it not locked to a single proprietary non multi-platform IDE. > The tools I mentioned as ahead of their time allowed for a Lisp Machines or Smalltalk like experience for C++, respectively. And they didn't succeed, become popular and were mostly completely unreachable to the sporadic hobbyist.
- jcelerier 5y ago> Would love to have it not locked to a single proprietary non multi-platform IDE. https://doc.qt.io/qtcreator/creator-editor-quick-fixes.html https://doc.qt.io/qtcreator/creator-editor-quick-fixes.html
- marcodiego 5y agoNice! Thanks!
- pjmlp 5y agoMy definition is that being commercial products is completely irrelevant to the fact that the toolings did exist.
- Someone 5y agoThat’s because the preprocessor adds too much flexibility to make it easy to write such tools. Once you have #ifdef FOO ... #else ... #endif you have to completely preprocess the compilation unit to find out which branch is taken. That means you have to interpret the build script (which may do -DFOO, possibly only for some compilation targets) You have to do that even for such simple things as syntax coloring. Now, you say “I simply parse both branches, check what things they define, somehow merge the two, and we’re good to go”. That won’t work, as the not taken branch(es) need not contain valid C/C++, and their validity may depend on whether other branches are taken. the preprocessor also has concatenation (https://gcc.gnu.org/onlinedocs/cpp/Concatenation.html https://gcc.gnu.org/onlinedocs/cpp/Concatenation.html). That makes writing a refactoring tool as good as impossible (for example, how do you rename quit_command to commandExit in the example on that page?) Now, lots of code is fairly reasonable in its use of the preprocessor, but writing a reliable tool is a lot harder, if it’s possible at all, than with Java.
- marcodiego 5y agoThanks for the reasonable view and explanation.
- jcelerier 5y agoCould you detail what exact tooling you are talking about ? Like, this static analyzer looks interesting but 5 years ago clang --analyze had no trouble producing me a nice html indicating the 27 steps across 6 functions that lead to a pointer being dereferenced after being deleted. Tooling is there but it seems that pretty much no one is aware of it - see e.g. this: https://github.com/cpp-best-practices/cppbestpractices/blob/master/02-Use_the_Tools_Available.md https://github.com/cpp-best-practices/cppbestpractices/blob/... or this: https://github.com/fffaraz/awesome-cpp https://github.com/fffaraz/awesome-cpp for a quick look at what exists (and both are very non-exhaustive).
- marcodiego 5y agoYes, the tools maybe there, but for more modern languages, they didn't needed so long for the same tools to appear.
- jcelerier 5y agobut most of these tools are, like, 10+ years old. Intel VTune, Coverity and KCacheGrind were already a thing in 2003. PC-LINT dates back to 1985. Of course languages more recent don't have to reinvent the ideas that have been developed for these older languages, it would be like saying that the first automaker sucked because the second automaker took less time at producing a vehicle.
- marcodiego 5y agoI remember people using eclipse and having orthography correction on comments, fixmes, "instant" reanalysis whenever the code was changed, automatic creation of accessory methods... things like that. I don't remember the same features were as popular among C/C++ developers at the time. Maybe my feeling is wrong, but I always had a feeling that more "modern" more "dynamic" languages implemented development tools faster or even before the same features became available and popular for C/C++.
- fluoridation 5y ago
- fluoridation 5y agoI don't agree at all. For example, some of the best debuggers I've used have been for C/++. As far as I understand it, even after years, debugging in Node.js still hasn't progressed beyond the level of printf() debugging. Also, by their very nature, dynamic languages offer less information at development time about things such as types and function signatures, so very often IDEs can't even tell you the type associated with a name by hovering over it.
- mumphster 5y agoI think you understand wrong. https://nodejs.org/api/debugger.html https://nodejs.org/api/debugger.html Combined with chrome dev tools or an ide of your choice has been some of the best tooling I’ve used in any programming language
- deleted 5y ago[deleted]
- jhgb 5y agoCommon Lisp implementations allowed you to change your program's code while debugging decades ago. Microsoft added bare minimum of similar functionality like fifteen years ago or so, if I remember correctly. I'm not even sure they've caught up on class redefinition and instance upgrade at runtime yet, which has been supported in CL since the 1980s.
- astrange 5y agoApple platforms used to have that ("zero-link") and removed it quickly because nobody actually liked it. I think this and Lisp/Smalltalk's image model is actually mistaken. It goes against the principle of "crash-only recovery" to try to recover from a bad state instead of being able to start over from the beginning.
- jhgb 5y agoGenerally in CL you should be able to recover from a usable intermediate state and restart from there.
- ajb 5y agoThat's because doing any kind of tooling for C++ is a heroic endeavour. The language just has orders of magnitudes more corner cases than anything except perl. For example there were some tools Mozilla maintained: Elsa, pork, treehydra etc but (as far as I can quickly find on my phone) it looks like the burden of maintaining them proved too much a while back.
- flohofwoe 5y agoI don't agree, C and C++ have excellent tools, they are just not evenly distributed (e.g. some IDEs have excellent integrated debuggers and profilers, other don't, some compilers have great integrated static analysis, others don't). The bigger problem is that in some programmer circles there seems to be an "ideological resistance" against using debugging tools (e.g. https://lemire.me/blog/2016/06/21/i-do-not-use-a-debugger/ https://lemire.me/blog/2016/06/21/i-do-not-use-a-debugger/), which is frankly baffling to me.