home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky alt.msdos.programmer:3009 comp.os.msdos.programmer:11612 comp.sys.ibm.pc.programmer:674 comp.lang.c++:18407 comp.lang.c:18880
- Path: sparky!uunet!spool.mu.edu!agate!ygdrasil.CS.Berkeley.EDU!faustus
- From: faustus@ygdrasil.CS.Berkeley.EDU (Wayne A. Christopher)
- Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer,comp.lang.c++,comp.lang.c
- Subject: Re: Newbie Wants Advice on C-Programming
- Date: 25 Dec 1992 01:55:10 GMT
- Organization: University of California, Berkeley
- Lines: 47
- Message-ID: <1hdpluINN1lv@agate.berkeley.edu>
- References: <1992Dec23.220530.15347@netcom.com> <1992Dec24.172333.7339@grebyn.com>
- NNTP-Posting-Host: ygdrasil.cs.berkeley.edu
-
- 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. I would suggest learning Scheme for a semester or two
- and then moving to C++.
-
- > 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.
-
- > 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.
-
- 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.
-
- > One reason that FORTRAN is associated with good number crunching
- > capabilities is that there exist out there optimized, proven math
- > libraries.
-
- The other reason (I think) is that the semantics of fortran array
- parameters make it easier for vectorizers and optimizers to handle
- loops. I don't remember the details, but this was behind the
- "noalias" controversy with ANSI C a while back.
-
- Wayne
-