home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / pascal / 8064 < prev    next >
Encoding:
Text File  |  1993-01-12  |  2.8 KB  |  62 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!haven.umd.edu!purdue!mentor.cc.purdue.edu!biomac1d.bio.purdue.edu!user
  3. From: pf@bilbo.bio.purdue.edu (Paul Furbacher)
  4. Subject: Re: TVision : BUG in my head or in TV?
  5. Message-ID: <pf-120193010406@biomac1d.bio.purdue.edu>
  6. Followup-To: comp.lang.pascal
  7. Sender: news@mentor.cc.purdue.edu (USENET News)
  8. Organization: Purdue University
  9. References: <30DEC92.02825818.0033@music.mus.polymtl.ca> <dmurdoch.262.725736007@mast.queensu.ca> <30DEC92.14039571.0035@music.mus.polymtl.ca> <1993Jan4.203255.2366@ncsu.edu> <07JAN93.20698633.0034@music.mus.polymtl.ca>
  10. Date: Tue, 12 Jan 1993 06:07:25 GMT
  11. Lines: 49
  12.  
  13. In article <07JAN93.20698633.0034@music.mus.polymtl.ca>, Steph wrote:
  14.  
  15. ...in a response to S.A. Modena's comments on Object.Init zeroing
  16. the fields in the member list:
  17.  
  18. > I wouldn't use it.  Even though TV might zero data fields, Turbo
  19. > Pascal itself doesn't, so in _my_ book it's bad practice to use this
  20. > feature, especially if not all versions do it, for instance.
  21.  
  22. All *two* versions of TurboVision use this, so the author's (Steph's)
  23. logic is a little askew here.  It takes very little getting used
  24. to, and in most cases, it would be uncommon to port objects
  25. created in TV to other object libraries.  Duncan Murdoch mentioned
  26. that he has confronted *annoyances* (not problems) over this 
  27. feature when porting TV objects to OWL.  But 1) porting is
  28. not a high priority for many practionners, 2) porting between
  29. TV and OWL will be done by people who are wise enough to 
  30. realize the initialization occurs in the TV Init calls and
  31. doesn't in the OWL calls. (I'm not smart enough to program in
  32. both, so I don't worry too much -- maybe a few minutes of lost
  33. sleep each night, but other problems contribute more to my 
  34. insomnia.)
  35.  
  36. > 'sides, they always thought me that un-initialized variables are a
  37. > bad programming practice.  
  38.  
  39. Again, twisted logic.  TV does exactly what your instructors 
  40. told you to do, initialize all variables to some common value, 
  41. like ZERO.  Good programming practice, so they say.
  42.  
  43. > ...I know that if I were to read someone
  44. > else's code that used hidden features of TVision, I'd quickly get
  45. > lost.  I'll stick to doing InitVar := 0, thank you.  :)
  46.  
  47. Two points here:
  48.  
  49. 1. Pascal and detail hiding.  Hand and glove.  What a lovely pair.
  50.  
  51. 2. Every time you pick up somebody else's code using either a 
  52. compiler or toolbox with which you are to some degree unfamiliar,
  53. you are dealing with not only the hidden assumptions of the 
  54. compiler and toolbox designer, but those of the programmer who used 
  55. those tools to create the program you have the pleasure of
  56. maintaining.  To hope to get away from hidden assumptions and
  57. features is an exercize in futility.  Don't go around 
  58. interacting with people, they're full of hidden features, like 
  59. personality traits and agendas.
  60.  
  61. pf
  62.