l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2010 Feb 28 23:29

The following is an archive of a post made to our 'vox mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox] things that really suck about C!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox] things that really suck about C!

On 2/28/10 6:35 PM, Brian Lavender wrote:
> I think if anything, C has been a certain detriment to the field of
> computer science!

Ah... it's easy to say that nearly 40 years after C's inception.  It was 
quite a revolutionary development at the time.  If I remember my history 
correctly, two of the major design goals for C were that it be 
consistent (few special/end cases) and that it its constructs run 
efficiently on production machines.  I think that the fact that C is 
still in wide-spread use in the field is a testament to how forward 
thinking it was for the time.  How many programs have you used that were 
written in Algol, COBOL, PL/I?  C has it's weaknesses and limitations 
but it has proved its utility over the years.

> One calls a function and the arguments are passed by value. Call a
> function with an array as an argument, and feel free to modify its
> contents!

Yep, all arguments are pass by value (... there's that consistency 
shining through).  When you pass an array, it passes a pointer to the 
first element.  For fun though, change mod_array's signature to:

void mod_array(const int *a);
void mod_array(const int a[]);

vox mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.