8,458 reputation
42445
bio website google.com/…
location Berlin, Germany
age
visits member for 4 years, 2 months
seen Nov 20 at 11:40

Mar
4
comment Is the C programming language still used?
I cringe every time someone equals C++ with OO. -1 from me just for that.
Mar
4
revised Is the C programming language still used?
typo fixed
Mar
4
comment Is the C programming language still used?
@JesperE: Indeed, C programmers instead boast about how C++ is so bloated and how it does things behind your back. Full circle. HAND.
Mar
4
comment Is the C programming language still used?
@JesperE: I guess I first read that article a decade ago. And you might have a point about programmers being home-blind about their beloved language — but this applies to C programmers just as well, so it's not an argument pro or contra either side.
Mar
4
comment Is the C programming language still used?
@JesperE: IMO the only time the STL abstractions are leaky is at compile-time, e.g. when you pass std::list iterators into std::sort, and all hell breaks lose. Otherwise it's a damn well-created abstraction. And if you feel you need to step through std lib code, you're likely doing something wrong. I cannot remember having needed to step through either std::printf or operator<< for built-ins. I have indeed looked at their code, though, to satisfy my curiosity, and I certainly think they are both mostly unreadable.
Mar
3
comment Is the C programming language still used?
@JesperE As it happens, I have changed jobs since I wrote that, and I am now programming for embedded devices. We're using C++, and it's remarkable what the STL and template meta-programming can do for you when you have weak hardware and hard realtime constraints as well as reliability necessities. (We're doing power plants.) Yes, you have to know whether you should use a std::vector or an std::map for a certain piece of code — but you do not have to implement it yourself, but can rely on well-tested, highly performant, and dependable library implementations offering high abstractions.
Jan
17
revised What does it mean to expose a C++ code publicly as a C API and what are the advantages of doing it?
typo fixed
Nov
20
comment Prefer algorithms to hand-written loops?
See here for why I think this code is worse.
Nov
5
comment Is the C programming language still used?
@James: And unless you manage to explain why there is no room between portable assembler (you do know that C was created as such, don't you?) and half-interpreted languages on virtual machines, I will have to decide which of those categories to put your "argument".
Nov
5
comment Is the C programming language still used?
No, @James, the problem is that, whatever argument is presented, some C-zealot will still yell "but code-bloat!" and "it's doing stuff behind my back!" while covering his eyes and plugging his ears. And that's just the rational ones. The others do as Torvalds does, say things like "you are full of bullshit" instead of making any points, and honestly believe that this is any argument other than for them being infantile.
Nov
4
comment Is the C programming language still used?
@James: Might I kindly point you at this comment, where there's a link to a posting in which someone earnestly takes Linus' rant as if it was something intelligible, and takes it apart sentence by sentence. Write a reply to that that's at least half as intelligent as that one and post the link here. Or go back to the cave you came from, and keep cargo-culting.
Oct
30
comment How to make the switch to C++11?
@JonPurdy: I understand that it includes that. However, I dispute that a traditional for loop is better than std::for_each(). In fact, I believe it's the opposite. Anyway, this now gets my upvote. :)
Oct
28
comment How to make the switch to C++11?
At first I thought suggesting it for learning C++11 would be odd, but seeing that you are still stuck in C-With-Classes land... A decade ago I read Koenig/Moo's Accelerated C++. By the time I was actually already doing template meta-programming (I only read it for a review), but it still felt like a revelation. (I used it as a base for teaching C++ ever since.) Coming from C With Classes, the book can show you a whole new language you didn't know you had at your disposal. It's only 250 pages, and you can then quickly advance to something C++11-specific, but IMO it's a worthwhile step.
Oct
28
comment How to make the switch to C++11?
I like how you are sarcastic about him not using variadic templates anytime soon, but I think missing uniform initialization is missing something really important for everyday programming.
Oct
28
comment How to make the switch to C++11?
I would update if it wasn't for std::for_each(). When you have lambda, it's certainly better than a traditional for loop. With a range-based for loop that might not be the case, but you didn't write "range-based for loop".
Oct
28
revised Pure C++ for iOS apps
if you want to use C++, capitalization matters!
Oct
21
awarded  Popular Question
Sep
29
comment Using T[1] instead of T for functions overloaded for T(&)[N]
@Lars: Isn't there a std::is_pod<> in C++11? (I am not sure, since I haven't played with C++11 yet.)
Sep
28
revised Using T[1] instead of T for functions overloaded for T(&)[N]
added 3 characters in body
Sep
27
comment When to use C over C++, and C++ over C?
@Buttons: It was you who made a claim ("C++ needs more memory"), so it should be you who backs that up. And, no, I am not claiming that C++ needs less memory. What I'm saying is that features cost, no matter whether the compiler implements them for you (virtual functions) or you do them yourself (array of function pointers).