Linked by MOS6510 on Thu 10th Jan 2013 23:25 UTC
General Development "For years I've tried my damnedest to get away from C. Too simple, too many details to manage, too old and crufty, too low level. I've had intense and torrid love affairs with Java, C++, and Erlang. I've built things I'm proud of with all of them, and yet each has broken my heart. They've made promises they couldn't keep, created cultures that focus on the wrong things, and made devastating tradeoffs that eventually make you suffer painfully. And I keep crawling back to C."
Permalink for comment 548470
To read all comments associated with this story, please click here.
Member since:

I didn't say they [Algol 60, PL/I] were top quality, only better than C.

And here we go with the blanket statements again, asserted without proof.

According to epoch documentation many companies did license languages on those days.

Yep, they did, but Bell Labs obviously didn't feel the needed to.

I only care about the Computer Science definition and C does not offer that.

Oh really? Then I quote from the linked Wikipedia page you linked:
Modules are typically incorporated into the program through interfaces. A module interface expresses the elements that are provided and required by the module. The elements defined in the interface are detectable by other modules. The implementation contains the working code that corresponds to the elements declared in the interface.

Since 1989 C has had rigorous support for this kind of compartmentalization (.h interface files, .c implementation files) and virtually every single project I've ever laid eyes on has used it. Of course it's rudimentary, but there are higher constructs on top which provide most, if not all of the features you would expect.

Usually more features tend to improve programmer's productivity.

By that logic, more controls on a car means better/safer/more productive driving. In actuality, Einstein's famous (possibly apocryphal) quote captures reality much better: "Everything should be made as simple as possible, but not simpler."

Well, actually English grammar was originally simplified thanks to the Normand occupation:

I said 'often times', not 'always'. Obviously at times languages expand in complexity to incorporate new necessary concepts and there's nothing wrong with that.

I have seen enough code like str[index] = NULL to make that statement. Not everyone writes str[index] = '\0', specially the ones that like to turn off warnings.

These programmers deserve a kick in the nuts for the above construct. This will produce warnings (implicit cast of void * to char) and is indicative of the fact that the author doesn't actually understand how computers work. I personally prefer str[index] = 0; Same meaning, less text, clearer.

Too many scars of off-shoring projects.

Ah well, if you buy cheap product, don't be surprised when it turns out to be shoddy. I have the same experience with offshore. Having a "safer" language means they will just provide you with dumber code monkeys.

I imagine any security expert would agree, but I might be wrong.

Security is not a simple yes/no game - the most secure computer is one that is off. It's all about finding middle ground. Some code warrants your approach, some doesn't. Making blanket statements, however, will guarantee that at times you will throw the baby out with the bathwater.

Should I now give a CS lecture about classes of static typing?

If you can't support your claims, don't make them. But before you dig into it, take a look at:
Note that some of these definitions are contradictory, others are merely orthogonal, and still others are special cases (with additional constraints) of other, more "liberal" (less strong) definitions. Because of the wide divergence among these definitions, it is possible to defend claims about most programming languages that they are either strongly or weakly typed.

So any statements you present will most likely just express your personal opinions on the matter. Oh and I have an MS in CS, so I've heard them before (including "C sux", "C rocks" and "Let's code everything in Prolog").

I am well aware of that Wikipedia page.
There many more C vendors than what Wikipedia lists and many customers don't let you choose the compiler to use.

If your hands our bound by your customer, then I suspect you have other problems in your project, not just with the language.

Well, have you ever done a 300+ developers multi-site project?

I was talking about things like, KDE, the Linux kernel, Illumos, etc. These are humongous code bases with tons of external dependencies and when doing a project that uses them, I don't have the time to go through each and every piece and fix a maintainer's bad assumptions about build environments, often times just to test a solution. That's why I said -Werror is good for development, bad for distribution.

To expert C coders, you mean.

Agree, it's probably news to you. GCC, for instance, supports -W and -Wall, both of which together activate lots of helpful static code analysis in GCC (unused variables, weird casts, automatic sign extensions, etc.).

Just stating my opinion.

No problem there - when you clearly state something as personal opinion, I have no problem. It's only the assertions and blanket statements that make my blood boil. We could probably understand each other over a beer much better than over the Intertubes.

Reply Parent Score: 4