home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!haven.umd.edu!purdue!mentor.cc.purdue.edu!biomac1d.bio.purdue.edu!user
- From: pf@bilbo.bio.purdue.edu (Paul Furbacher)
- Subject: Re: TVision : BUG in my head or in TV?
- Message-ID: <pf-120193010406@biomac1d.bio.purdue.edu>
- Followup-To: comp.lang.pascal
- Sender: news@mentor.cc.purdue.edu (USENET News)
- Organization: Purdue University
- 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>
- Date: Tue, 12 Jan 1993 06:07:25 GMT
- Lines: 49
-
- In article <07JAN93.20698633.0034@music.mus.polymtl.ca>, Steph wrote:
-
- ...in a response to S.A. Modena's comments on Object.Init zeroing
- the fields in the member list:
-
- > I wouldn't use it. Even though TV might zero data fields, Turbo
- > Pascal itself doesn't, so in _my_ book it's bad practice to use this
- > feature, especially if not all versions do it, for instance.
-
- All *two* versions of TurboVision use this, so the author's (Steph's)
- logic is a little askew here. It takes very little getting used
- to, and in most cases, it would be uncommon to port objects
- created in TV to other object libraries. Duncan Murdoch mentioned
- that he has confronted *annoyances* (not problems) over this
- feature when porting TV objects to OWL. But 1) porting is
- not a high priority for many practionners, 2) porting between
- TV and OWL will be done by people who are wise enough to
- realize the initialization occurs in the TV Init calls and
- doesn't in the OWL calls. (I'm not smart enough to program in
- both, so I don't worry too much -- maybe a few minutes of lost
- sleep each night, but other problems contribute more to my
- insomnia.)
-
- > 'sides, they always thought me that un-initialized variables are a
- > bad programming practice.
-
- Again, twisted logic. TV does exactly what your instructors
- told you to do, initialize all variables to some common value,
- like ZERO. Good programming practice, so they say.
-
- > ...I know that if I were to read someone
- > else's code that used hidden features of TVision, I'd quickly get
- > lost. I'll stick to doing InitVar := 0, thank you. :)
-
- Two points here:
-
- 1. Pascal and detail hiding. Hand and glove. What a lovely pair.
-
- 2. Every time you pick up somebody else's code using either a
- compiler or toolbox with which you are to some degree unfamiliar,
- you are dealing with not only the hidden assumptions of the
- compiler and toolbox designer, but those of the programmer who used
- those tools to create the program you have the pleasure of
- maintaining. To hope to get away from hidden assumptions and
- features is an exercize in futility. Don't go around
- interacting with people, they're full of hidden features, like
- personality traits and agendas.
-
- pf
-