Article View: alt.msdos.programmer
Article #867Re: Newbie Wants Advice on C-Programming
From: Michael Malak
Date: Fri, 25 Dec 1992 07:00
Date: Fri, 25 Dec 1992 07:00
69 lines
3633 bytes
3633 bytes
In article <1hdpluINN1lv@agate.berkeley.edu> faustus@ygdrasil.CS.Berkeley.EDU (Wayne A. Christopher) writes:
>In article <1992Dec24.172333.7339@grebyn.com> malak@grebyn.com (Michael Malak) writes:
>> In my opinion, there is no fast track to either C or C++. I feel the
>> following must be learned in order:
>> 1) Pascal, with two semesters experience
>
>IMHO, Pascal has nothing useful that C doesn't have, except for array
>bounds checking. You you use C++ you can use a vector class that
>gives you that.
Pascal has the following advantages over C:
1) It has structured syntactic blocks for constants, types and
variables.
2) It has nested procedures.
3) Most importantly, the good structured programming professors
wouldn't be caught dead teaching C (biggotry in my opinion).
> I would suggest learning Scheme for a semester or two
>and then moving to C++.
Is there an MS-DOS Scheme?
>
>> 2) Assembly, learned anywhere, with tinkering on your own
>
>I'm not sure it's so important to really program in assembly. You
>should understand basic machine architecture, and have some idea of
>what an instruction set looks like, but writing real code, especially
>for a RISC, doesn't teach you all that much.
It depends on what you mean by "writing real [assembly] code". I think
to learn anything you need to try it at least once. The programming
assignments in an assembly class would be sufficient, as would be
trying a couple of exercises out of a tutorial book if one were
learning it on his own.
>
>> 3) C, 2-3 years min. anywhere (college, real world, or tinkering)
>> After that you can learn and appreciate C++. You need to first learn
>> structured programming and algorithms, most importantly, linked lists
>> and trees. Since C is tightly coupled to assembly in many ways (C is a
>> shorthand for assembly, and C integrates easily with assembly modules),
>
>Two point here. First, you can start with a subset of C++ that is
>close to C, but includes important things such as mandatory function
>prototypes and flexible declaration positioning, and add classes and
>other OO features gradually. You don't have to jump into multiple
>inheritance the first day. There are plenty of ways that C++ improved
>on C that don't add much conceptual complexity.
Good point.
>
>Second, it's not right to call C "shorthand for assembly". One thing
>you can say about C and C++ is that it discourages language features
>that can't be implemented at compile time, but that doesn't make it
>any closer to assembly than any other compiled language. And most
>languages "integrate easily with assembly modules", simply because
>that's what compilers produce.
BASIC, LISP, and all the other interpretive languages do not integrate
with assembly. And on many platforms other than MS-DOS you cannot mix
(link) outputs from different compilers. All in all, most languages on
most platforms do not mix well with assembly. I know of no C compiler
that cannot link in assembly modules; I cannot say the same for any
other language.
Technical Details
Message-ID:
<1992Dec25.070024.15672@grebyn.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!grebyn!daily!malakReferences:
<1992Dec23.220530.15347@netcom.com> <1992Dec24.172333.7339@grebyn.com> <1hdpluINN1lv@agate.berkeley.edu>Show Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer,comp.lang.c++,comp.lang.c Path: arc1-ca.pugleaf.net!sparky!uunet!grebyn!daily!malak From: malak@grebyn.com (Michael Malak) Subject: Re: Newbie Wants Advice on C-Programming Message-ID: <1992Dec25.070024.15672@grebyn.com> Organization: Grebyn Timesharing References: <1992Dec23.220530.15347@netcom.com> <1992Dec24.172333.7339@grebyn.com> <1hdpluINN1lv@agate.berkeley.edu> Date: Fri, 25 Dec 1992 07:00:24 GMT Lines: 70