3 ms·
You're "broadly correct" in the sense that the Republican Party is "broadly libertarian." I spent 5 years writing almost 100% C and C++ in college, with detour
by IsaacSchlueter 18y ago
You're "broadly correct" in the sense that the Republican Party is "broadly libertarian."
I spent 5 years writing almost 100% C and C++ in college, with detours into Lisp, Java, VB, and Ada. (Actually, I'd grown up on Basic, so VB wasn't a detour, really.) After school, I worked at a VB shop, but built a few side-projects in C++. I've had to fix things that were broken, and I don't have a problem with the linker or debugger semantics. I've used templates, and both has-a and is-a object extension. I am certainly not an world-class expert in it, but it's not like I tried it once, got burned, and decided I hated it.
I'm a web developer because I like web development better. For a variety of reasons, not the least of them the challenge of building code that is so portable it will run on 12 different browser/os combinations, and the opportunity to work in many different languages, I find front-end development much more rewarding.
My aversion to C is based on a simple rule of thumb:
(usefulness of a feature) / (tokens required to implement it)
Lines of code is a pretty good fill-in for "tokens", but I had to change the rule when someone pointed out that a 500 character regex in Perl is hardly an elegant or maintainable program :)
Another way to express this is that the elegance of a solution is the number of tokens that are not essential to the solution and do not aid in understanding the intent of the code. For example, compare Javascript's closures with Lisp's or Erlang's syntax. On the other side, compare any of those with the mess of class and object boilerplate in C++ or Java or PHP.
Conceptual cruft is even more pervasive. If encapsulation requires class/object constructs, then there is no way to get past that.
Some programmers will be able to create more elegant solutions than others, of course. But without changing languages, you can't get past the cruft that is built into language. (Or, in the case of C, the cruft that was not removed from the language.)
Again, "power" does not mean "you can do anything with it." C can be used to tell a computer to do anything that computer can do. But I'd argue that that's a naive view of the power of a programming language. There are things that are trivial to express in other languages, and require several lines to do in C. Just something as simple as comparing that two strings hold the same value requires about half as much conceptual overhead in almost any other language.
Or is there a version C with lexical closures, first-order functions and strings, and a garbage collector that I'm not familiar with?
I'm not sure what you mean by You don't have the scaffolding around you to provide a fallback for changes.
The claim that C programming takes more knowledge up front than web work does is frankly presumptuous and a bit misguided. I've seen the Javascript that C experts write. It's terrible. In fact, I'd argue that since quality web work requires an understanding of semantic HTML, CSS, Javascript, maybe some Flash and/or Canvas chops, and probably at least one kind of server-side language like PHP or Java, it requires much more knowledge up front than almost anything else out there.