Hacker News new | past | comments | ask | show | jobs | submit login

Before becoming suitably annoyed at your preprocessor magic, which I will examine shortly, I would like to point out one example I had in the back of my mind when I wrote my comment: just google lttng/tracepoint.h. It just seems to me like a terrible hack.

Of course, if you want to criticize templates and meta-programming (as an alternative to pre-processor), there are many jaw-dropping examples in Boost, V8, etc. I can remember several late-night sessions wrangling with (Boost) serialization code, and the cryptic multi-level warnings that ensue. Those were bad times.

I always figured that the answer would be a language/tool simple enough that a serious programmer could, without heroic effort, manage to customize to his needs over a weekend.

Sadly, it appears that the language lawyers have gone insane, and the trend appears to be entirely opposite (with the recent developments in C++0x/C++11/C++14).

For background: I was a big fan of Visual Studio (when working in games and finance), but my most recent posting precludes developing in Windows, and then porting to Linux for deployment. Looks like most people (at this posting) are doing printf-programming, relying on logs to see what happened (in debug builds). It's hard (within our current heterogeneous environment) to setup gdbserver + Eclipse or some other gdb client on a Windows front-end (which we need for administrativia).

The point is I miss being able to just set breakpoints, launch the program and inspect program state on the fly, as a means of learning the behaviour.

I have cared enough about all this, and used to eagerly await the day that MS would open-source the C++ AST/Intellisense engine, opening the door for programmers being able to perform complexe refactorings with relative ease. Maybe I should just but the whole-tomato software, or some other tool. These days, I am following Clang developments with interest and hope.

FYI, I think the ultimate annoyance is some Linux fanboy who doesn't "believe" in C++ or IDEs, but who is too young to remember when GUIs were not even an option, that text mode was all you had. I am surprised at the resurgence in TUIs (and the longevity of some CLIs). Sure, C++ has its warts, but RAII is better than gotos (here, I am conflating the kernel developer's aversion to C++ with the likelyhood that he/she uses vi, or some other console-based editor).

Sorry for the confused monologue. I'll check out the code later.




Inspecting program behaviour via the debugger has always been an uphill battle in C/C++. Sometimes you're working on something where the bug only surfaces in release builds (because the debug build isn't optimised enough and the program runs too slowly to trigger it). Good luck debugging when half the function arguments read "optimised out" and program execution jumps around randomly because the compiler reordered your code for efficiency.

One thing I've always dreamed of is having the compiler emit source for the assembly it generated. So you can attach the debugger and see the code as it actually is, rather than as it was when you wrote it. I love how in Java my code gets optimised by the JIT, but once I start debugging all the optimisations come off (but only once I need to see the source) and what I see is what is running.


I fully agree with you.

Using IDEs since the Amiga/MS-DOS days, Devpac, all Turbo languages and so on.

Getting half-decent IDEs in UNIX has always been an uphill battle.

And no, vim and Emacs just get one half-way there, even after stacks of ELisp code.

Although nowadays there are at least KDevelop, Eclipse, Netbeans, QtCreator to pick from.

As someone that started coding in the 80's, I also don't get this attitude of doing PDP-11 style programming.

My solution is to choose projects that allow me to use modern tools.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: