home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / misc / 4031 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  5.5 KB

  1. Path: sparky!uunet!think.com!barmar
  2. From: barmar@think.com (Barry Margolin)
  3. Newsgroups: comp.lang.misc
  4. Subject: Re: Safety.  Was: Re: Pointers
  5. Date: 15 Dec 1992 01:31:00 GMT
  6. Organization: Thinking Machines Corporation, Cambridge MA, USA
  7. Lines: 94
  8. Message-ID: <1gjcgkINNqc8@early-bird.think.com>
  9. References: <Bz0Iy5.A9K@mentor.cc.purdue.edu> <724312516@sheol.UUCP> <Bz9FL2.9rp@mentor.cc.purdue.edu>
  10. NNTP-Posting-Host: telecaster.think.com
  11.  
  12. In article <Bz9FL2.9rp@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
  13. >In article <724312516@sheol.UUCP> throopw@sheol.UUCP (Wayne Throop) writes:
  14. >>I have not seen any posting in which Herman explains *why* he does not
  15. >>consider unions an adequate way to specify type punning
  16. >ANYTHING which suggests to the compiler that something is to be stored when
  17. >it does not have to be is not adequate.  Also, there are problems if one
  18. >type of object is, say, 32 bits, and another 64 bits.
  19.  
  20. Unions don't suggest that additional information should be stored.  And for
  21. your applications, I don't expect that you would ever have a union
  22. containing objects of different sizes, so what's the problem?
  23.  
  24. >There was an attempt in the 1930's to introduce a language called
  25. >"Basic English" which eliminated most of the verbs in English, as well
  26. >as other features.  It never caught on.  Languages should be arbitrarily
  27. >extensible.  If humans can conceive of an operation, it should be
  28. >possible to add that operation to the language with little problem.
  29.  
  30. Humans are remarkably flexible in our use of language; we learn new words
  31. and grammatical constructs with relative ease, and it seems that much of
  32. our brain (as well as other parts of human physiology) is structured around
  33. and optimized for language use.  We have not yet developed the techniques
  34. that allow high-level computer languages to be so extensible; the best we
  35. can do is allow the user to slip low-level constructs in, with constructs
  36. like assem() or with separately-compiled assembly routines.
  37.  
  38. >The same holds for types; the C++ classes are really types, and the
  39. >C typedef should have been called typealias.  Even prior to C, there
  40. >were implementations of Fortran which allowed additional types.
  41.  
  42. And "static" should have been called "local" when it's used to specify that
  43. a name should have file scope, but who really cares what it's called?
  44. "Typedef" was presumably given that name because it defines a name that can
  45. be used where the grammar specifies that a type name belongs.
  46.  
  47. >> Why should their FIRST course introduce them to situations
  48. >> that are strikingly atypical of most software development?
  49. >
  50. >This is a chicken-and-egg phenomenon.  Most software development does
  51. >not do certain things because the languages, compilers, and the training
  52. >of the programmers does not mention them.  
  53.  
  54. And most buildings are designed using "standard" architectural designs,
  55. because that's what is taught in architecture classes.  A typical
  56. architecture curriculum probably doesn't teach you how to design the
  57. Guggenheim Museum.  Yes, there's a problem of in-breeding in such
  58. educational systems, but I don't think the results are as serious as you
  59. do.  Exceptional students will go beyond the syllabus, and those are the
  60. people who should be dealing with the unusual projects.
  61.  
  62. If the language features you talk about were really that important, I think
  63. that in the 35-year evolution of computer languages they would have managed
  64. to creep in to some more languages.  Then again, you may be right about the
  65. incest problem -- look at how difficult it is to convince people bred on C
  66. and Pascal that the automatic memory management of languages like Lisp is
  67. a good thing.
  68.  
  69. >                        Political correctness is bad
  70. >even in political situations.  What proportion of current programmers,
  71. >even those who have had "advanced" courses, are aware of the important
  72. >mathematical types of fixed point (NOT integer) and rational?  How many
  73. >of them would think of including them?  There are many situations in
  74. >which floating point is a guaranteed way to have problems, and the 
  75. >person who starts out thinking that the type list of languages such
  76. >as C are adequate will have a lot of unlearning to do to be able to
  77. >do a good job in those numerous cases where C is inadequate.  Unlearning
  78. >provides major obstacles for students in mathematics and statistics, and
  79. >I see no good reason why CS and programming languages should be any
  80. >different in this matter.
  81.  
  82. Well, there's a real bootstrapping problem here.  Supposing we wanted to
  83. introduce students to all these issues that aren't addressed in the
  84. available computer languages, how would we do so?  We could have them try
  85. to program the missing routines, but in order to do that they have to know
  86. the language.  So first we must teach them how to program in existing
  87. languages!
  88.  
  89. Do you really think that someone should be learning the inherent problems
  90. of floating point or how to implement fixed-point and rational arithmetic
  91. before they learn about things like subroutines and if-then-else
  92. constructs?  The latter will be useful for them no matter what types of
  93. programs they write, while the former are useful only in a small
  94. application domain.
  95.  
  96. By the way, none of the courses in the CS program at MIT teach you a
  97. programming language.  They teach computer concepts and programming
  98. techniques, and use programming languages in homework and lab work.  This
  99. is analogous to the EE program -- there's no lecture on wiring up a
  100. circuit.
  101. -- 
  102. Barry Margolin
  103. System Manager, Thinking Machines Corp.
  104.  
  105. barmar@think.com          {uunet,harvard}!think!barmar
  106.