[97959] in RedHat Linux List
Re: Learning C (on Linux). Please advice.
daemon@ATHENA.MIT.EDU (Simon J Mudd)
Thu Nov 5 23:14:34 1998
Date: Fri, 6 Nov 1998 01:18:37 +0100 (MET)
From: Simon J Mudd <sjmudd@bitmailer.net>
To: redhat-list@redhat.com
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
Cameron Simpson <cs@zip.com.au> wrote:
> Try to program to ANSI and POSIX. Your porting difficulties will be
> reduced.
Tim Hockin <thockin@isunix.it.ilstu.edu> wrote:
> GCC is ANSI compliant. It is not Linux's particular compiler. As long
> as you learn good ANSI and POSIX C, you'll be allright.
While these comments are true it's also fair to say that few books address
the problems of "style", of using the unix system calls, and making the
source portable between different versions of unix, all at the same time.
Anyone who's seen the gcc Makefiles will know that they are complicated,
although to compile on one of several platforms all you need to do is
little more than "./configure ; make ; make install".
Achieving this is quite difficult especially if you want to write good
code and you want it to be truly portable.
I've found few books which touch this subject properly, and while they're
not strictly a "C" problem they're a problem you face in the real world
writing real applications. Few programmers actually write code which is
trivial to port to another platform.
People writing code for linux SHOULDN'T write it non-portably, as this
will allow more people to use their code, and also may help spread it to
other unix platforms.
Simon
--
Simon J Mudd, Madrid SPAIN Tel: +34-91-559 2854 email: sjmudd@bitmailer.net
[short messages - from radio hams only] ----> ea4els@ea4els.ampr.org
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com http://archive.redhat.com
To unsubscribe: mail redhat-list-request@redhat.com with
"unsubscribe" as the Subject.