Re: C coding

"James H. H. Lampert" <jamesl-6/ELSmrcqeUu8xhjR5IN5AC/[email protected]>
Newsgroups gmane.comp.lang.as400.c
Message-ID <[email protected]>
>> Learning C is indeed not like breathing, but as soon as you know
>> how to master it, writing is as easy as breathing.

Speaking as a mixed-language programmer who is (or at one time was)
fluent in several dialects of BASIC, QBASIC, and FORTRAN, as well as 
Pascal, PL/I, COBOL, Java, RPG, and C, not to mention MI, and the 
Assembler languages of the PDP/11 and the 8086, I can say that 
everything Buck said in response to the above is true. With my Assembler 
and MI experience, I have been "closer to the bare iron" than most C 
programmers ever get, and with my PL/I, Java, and QBASIC experience, 
I've also been far more abstracted from it than most RPG programmers get.

The thing I find the most uncomfortable about C is that it, while 
maintainng the appearances of a true HLL, takes one close enough to the 
"bare iron" to easily get you into trouble, but not necessarily close 
enough to get you out of it. (Of course, I've recently learned that the 
same can also be said of calling Java from ILE RPG [which is an order of 
magnitude closer to the iron than Java gets], but that is neither here 
nor there). Or, put another way, C gives you enough rope to hang 
yourself (yes, even on an IBM Midrange system; in fact, I'd say that 
it's probably easier to unwittingly circumvent the safeguards on an 
AS/400 from C than from MI), and while it doesn't actually help you tie 
the knot, it does make it very easy to do so without realizing it.

(MI, being "the assembler language of a virtual machine," is in many 
ways the converse of C: it has the look and feel of an assembler, while 
maintaining most of the traditional HLL abstractions and safeguards.)

At any rate, if you only know (or use) one language, it's as if the only 
item in your toolbox is a hammer: every problem in the world ends up 
looking like a nail.

--
JHHL
-- 
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list
To post a message email: C400-L-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.