Pelles C forum

C language => Beginner questions => Topic started by: severach on February 21, 2009, 08:13:20 PM

Title: Why does C code look like an alien language?
Post by: severach on February 21, 2009, 08:13:20 PM
Because you haven't practiced at it. C is the best second language I know. Cobol and Fortran and Basic all look cryptic to me. Those languages have a lot of keywords and huge libraries. If you weren't familiar with all those by working it regularly those languages would be alien to you too.

By contrast C has a small library, few keywords, and makes writing as terse as possible. Rather than begin, end, next, then; C has braces {}. That's what I expect to see and anything larger hurts my eyes. Why should I look for BEGIN when I can much more easily look for {?

C is plenty easy to learn. It just takes some practice. As a side benefit you get to use one of the best IDEs in the business.
Title: Why does C code look like an alien language?
Post by: Romashka on February 23, 2009, 06:31:03 PM
while I agree that {} instead of begin/end is just different, not worse (or better) syntax,
complex declarations involving pointers and arrays (http://msdn.microsoft.com/en-us/library/1x82y1z4(VS.71).aspx) look ugly (and often hard to "decypher" by quick look) comparing to how the same can be done in D (http://digitalmars.com/d/2.0/arrays.html) (and even very verbose Pascal style declarations are more easily "decyphered").
Title: Why does C code look like an alien language?
Post by: MT on April 26, 2009, 01:25:23 AM
It IS an alien language but is happens to be the de-facto language which is why we all use it. I has all the power of assembler but none of the friendliness of BASIC. FreeBasic is changing this and unless you have a good reason to use C I would check it out.