home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / alt / msdos / programm / 3009 < prev    next >
Encoding:
Internet Message Format  |  1992-12-24  |  2.9 KB

  1. 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
  2. Path: sparky!uunet!spool.mu.edu!agate!ygdrasil.CS.Berkeley.EDU!faustus
  3. From: faustus@ygdrasil.CS.Berkeley.EDU (Wayne A. Christopher)
  4. Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer,comp.lang.c++,comp.lang.c
  5. Subject: Re: Newbie Wants Advice on C-Programming
  6. Date: 25 Dec 1992 01:55:10 GMT
  7. Organization: University of California, Berkeley
  8. Lines: 47
  9. Message-ID: <1hdpluINN1lv@agate.berkeley.edu>
  10. References: <1992Dec23.220530.15347@netcom.com> <1992Dec24.172333.7339@grebyn.com>
  11. NNTP-Posting-Host: ygdrasil.cs.berkeley.edu
  12.  
  13. In article <1992Dec24.172333.7339@grebyn.com> malak@grebyn.com (Michael Malak) writes:
  14. > In my opinion, there is no fast track to either C or C++.  I feel the
  15. > following must be learned in order:
  16. >   1) Pascal, with two semesters experience
  17.  
  18. IMHO, Pascal has nothing useful that C doesn't have, except for array
  19. bounds checking.  You you use C++ you can use a vector class that
  20. gives you that.  I would suggest learning Scheme for a semester or two
  21. and then moving to C++.
  22.  
  23. >   2) Assembly, learned anywhere, with tinkering on your own
  24.  
  25. I'm not sure it's so important to really program in assembly.  You
  26. should understand basic machine architecture, and have some idea of
  27. what an instruction set looks like, but writing real code, especially
  28. for a RISC, doesn't teach you all that much.
  29.  
  30. >   3) C, 2-3 years min. anywhere (college, real world, or tinkering)
  31. > After that you can learn and appreciate C++.  You need to first learn
  32. > structured programming and algorithms, most importantly, linked lists
  33. > and trees.  Since C is tightly coupled to assembly in many ways (C is a
  34. > shorthand for assembly, and C integrates easily with assembly modules),
  35.  
  36. Two point here.  First, you can start with a subset of C++ that is
  37. close to C, but includes important things such as mandatory function
  38. prototypes and flexible declaration positioning, and add classes and
  39. other OO features gradually.  You don't have to jump into multiple
  40. inheritance the first day.  There are plenty of ways that C++ improved
  41. on C that don't add much conceptual complexity.
  42.  
  43. Second, it's not right to call C "shorthand for assembly".  One thing
  44. you can say about C and C++ is that it discourages language features
  45. that can't be implemented at compile time, but that doesn't make it
  46. any closer to assembly than any other compiled language.  And most
  47. languages "integrate easily with assembly modules", simply because
  48. that's what compilers produce.
  49.  
  50. > One reason that FORTRAN is associated with good number crunching
  51. > capabilities is that there exist out there optimized, proven math
  52. > libraries.
  53.  
  54. The other reason (I think) is that the semantics of fortran array
  55. parameters make it easier for vectorizers and optimizers to handle
  56. loops.  I don't remember the details, but this was behind the
  57. "noalias" controversy with ANSI C a while back.
  58.  
  59.     Wayne
  60.