The Unreasonable Effectiveness of C
damienkatz.net
The Unreasonable Effectiveness of C
1–10 of 394 posts
Re: The Unreasonable Effectiveness of C
#2Nonsense. This sudden C fad is totally baffling to me. C is a great language for low-level work and it does have an attractive minimal elegance but is in absolutely no sense of the term a high level language. A language with next to no standard containers or algorithms, manual memory management, raw pointers, a barely functional string type and minimal standard library and concurrency primitives is just the wrong choice for any application that doesn't need the kind of low-level control C provides.
Go ahead and jump on the bandwagon but don't come crying to me when you wind up with an unmaintainable mess riddled with security holes and fiendishly subtle memory errors.
Re: The Unreasonable Effectiveness of C
#3> C has the fastest development interactivity of any mainstream statically typed language.
What? Despite all its shortcomings, Java in a modern IDE effectively has zero build time. The level of interactivity is as fast as that of interpreted languages. I haven't seen anyone manage this with C yet.
Re: The Unreasonable Effectiveness of C
#4Case in point: Whenever you're doing signed arithmetic, and it overflows, you're in the land of undefined behaviour. (See here for an example of how this can bite you: http://thiemonagel.de/2010/01/signed-integer-overflow/)
Another case in point: type-punning with through pointer casting is also UB. [Going through union is legal though.]
I'm pretty sure the author hasn't written a line of ANSI-C compliant code in his life, otherwise he'd never write something like this.
Re: The Unreasonable Effectiveness of C
#5I wonder if this gentlemen has tried Go? If he is a big C fan, Go might be a great choice for the other 90%. Not only is Go a safer version of C with lots of great modern features, it integrates very well with C via cGo.
If memory usage and speed are your preeminent concerns, C is certainly a force to be reckoned with: http://benchmarksgame.alioth.debian.org/u64q/which-programs-...
Re: The Unreasonable Effectiveness of C
#6I immediately thought of this: "Go is like a better C, from the guys that didn’t bring you C++" — Ikai Lan [1]
And that's what it feels like to me when I use it.
Re: The Unreasonable Effectiveness of C
#7Re: The Unreasonable Effectiveness of C
#82) Figure out something controversial to say about it and a justification for that
3) Write it up and post it to reddit, HN, &c
4) Enjoy the hits
EDIT: Which is enabled by this - http://news.ycombinator.com/item?id=5037649
Re: The Unreasonable Effectiveness of C
#9C is a fantastic high level language. Nonsense. This sudden C fad is totally baffling to me. C is a great language for low-level work and it does have an attractive minimal elegance but is in absolutely no sense of the term a high level language . A language with next to no standard containers or algorithms, manual memory management, raw pointers, a barely functional string type and minimal standard library and concu…
Its flaws are very very well known, and this is a virtue. All languages and implementations have gotchas and hangups. C is just far more upfront about it. And there are a ton of static and runtime tools to help you deal with the most common and dangerous mistakes. That some of the most heavily used and reliable software in the world is built on C is proof that the flaws are overblown, and easy to detect and fix.
Re: The Unreasonable Effectiveness of C
#10To nitpick on a single statement: > C has the fastest development interactivity of any mainstream statically typed language. What? Despite all its shortcomings, Java in a modern IDE effectively has zero build time. The level of interactivity is as fast as that of interpreted languages. I haven't seen anyone manage this with C yet.
I've been using IntelliJ IDEA for Java development for the last 4 years, and before that I used C and C++ using Emacs for 7 years.
I am way more productive in IntelliJ IDEA than I was before. One reason is the instant feedback on syntax errors when I type the code. I don't need to compile to see them, as I used to in C and C++. Another reason is the navigation support you get in an IDE.
I've written more about the differences in development environment here: http://henrikwarne.com/2012/06/17/programmer-productivity-em...