Jump to content
  • entries
    643
  • comments
    1,623
  • views
    380,807

Top 10 Reasons NOT to Program in C


JamesSavik

819 views

Over on Digg.com, I saw an article called Ten reasons every programmer should know C. On a whole I have to agree with the author: if you are a computer science student or a professional programmer, you should know C. It is a powerful language but that power comes at a high price. It is one of the most difficult languages to learn, use and master. However, if you do manage to master C, there aren't any uglier languages to learn.

 

Most programs don't really require C and can be handled at a higher level like an SQL database or a scripting language like Perl or Ruby. Using C would be taking the long way to handle a trivial application. Where C really shines is in systems and utility software and cross-platform portability. If you are worried about things like that then C might just be what you are looking for.

 

In the interest of balance, I decided to include a rebuttal here in my blog:

 

 

Top 10 Reasons NOT to program in C

 

1). Because C code is ugly and will make you cross-eyed.

 

2). Because those that want to fondle embedded technologies risk creating a new order of intelligence that will exterminate mankind.

 

3). C stands for :wacko: cryptic, :pissed: crusty and :2hands: conniption.

 

4). If you use C, you'll spend most of your time rewriting library routines already included in C++.

 

5). C uses pointers which often point to nothing in particular. ===> nowhere

 

6). C programs are small, tight and efficient and make Microsoft programs look bad.

 

7). C programmers consider themselves elite and wonder who are you to think that you can join their club.

 

8). Programming in C can cause dain bramage.

 

9). Bugs in C look remarkably like undocumented features.

 

10). C isn't object oriented and you probably can't afford the version of C that is.

4 Comments


Recommended Comments

Ah, C, the language I love to hate, as I write more code in it than any other language. (Granted, mostly in support for languages that aren't C) At this point I'm ambivalent. On the one hand I think more programmers should know it because it gives a lot of low-level power that you don't have in most other languages that're in vogue today. (Forth's good for that too) On the other, an awful lot of the programmers I know who program in it ought not to, since they'd do a lot less damage in most other languages.

 

It's a pity the Lisp guys, lo those many years ago, dove straight down to the depths of elegant, unreadable consistency. Had the syntax and presentation not sucked so very hard the computing world would likely have been a much, much better place. Continuations, tail calls, first class functions, closures, working garbage collection... the list of stuff that slowly comes to the surface thirty years after it was first done in Lisp is kind of depressing, really. Pretty much all of it basically insanely difficult to do in C, and damn tough to implement in C for other languages.

 

'Course, it may well have been that the general state of the art wasn't up for run of the mill programmers to handle stuff like that, so it wouldn't have mattered. Still, I can but hope for the death of C. (But just for other people, you understand ;) )

Link to comment

When I learned C I was already quite fluent in Pascal. Going to C from Pascal, I felt like I had been let out of a cage. Being let out of a cage is not a completely positive experience, because you now have to fend for yourself.

 

I've dabbled with C++ and Java, but never did much with them. I've avoided C#, mostly because that scale just never seemed sufficienty under the fingers, and I preferred to think of it as Db. Most of what I was doing made much more sense in a procedural language rather than object-oriented.

 

You said that C is ugly, but ((((((((((((((((((lisp))))))))))))))))))) has it beat.

 

I was never destined to be a great programmer because I liked doing things just because they were cool. I liked things like recursion and operator overloading.

 

These days, about all I write is HTML, PHP, and MySQL. I can handle any of those, but in real life I have to use them all together, and that's where I get confused. Each has its own syntax, such as when you need quotation marks and whether you need single or double, and such. I need to imbed MySQL commands inside PHP commands which themselves might be inside a line of HTML, so I get lost as to whose syntax I'm supposed to be using at the moment and what characters have to be escaped. Nice ugly old C sounds pretty good by comparison.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Our Privacy Policy can be found here: Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..