comp.lang.ada
 help / color / mirror / Atom feed
From: wfrye@mnsinc.com (William Frye)
Subject: Re: Operators Questions
Date: 1996/11/07
Date: 1996-11-07T00:00:00+00:00	[thread overview]
Message-ID: <55smnk$sta@news1.mnsinc.com> (raw)
In-Reply-To: 32766B6F.3C37@watson.ibm.com


Norman H. Cohen (ncohen@watson.ibm.com) wrote:
: Richard Irvine wrote:
: > 
: > Ada allows overloading of the predefined operators
: > but not definition of new operators.
: > Sometimes code could be made more readable if it
: > were possible to define new operators, e.g.
: > 
: > if   aTimeInterval encloses anotherTimeInterval
: > then -- It is clear which interval encloses which.
: >      ...
: > 
: > instead of
: > 
: > if   encloses(aTimeInterval, anotherTimeInterval)
: > then -- Which interval enclosed which?
: >      -- One has to look at the declaration of
: >      -- the function.
: >      -- One could use formal parameters, but
: >      -- then things start to get long-winded.
: >      ...

: Named notation helps:

:    if Encloses (Outer => A_Time_Interval, Inner =>
: Another_Time_Interval) then
 I disagree totally here.  IMNSHO named notation here only serves to make
a strained, unnatural construction enven more strained and more ridiculously
long winded.  With code and comments for any usable size module already pushing reasonable limits in size we need extra characters in our code like we need a
"new edition of the Wpanish Inquisition."  (Incidentally, from my background
in maintainence programming I have developed a rule of thumb,  If a module
doesn't fit on two pages(which is the limit I can get to spreading a listing
on a table) then the developer had better give GOOD reasons for the length.)
: -- 
: Norman H. Cohen
: mailto:ncohen@watson.ibm.com
: http://www.research.ibm.com/people/n/ncohen




  reply	other threads:[~1996-11-07  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-29  0:00 Operators Questions Richard Irvine
1996-10-29  0:00 ` Norman H. Cohen
1996-11-07  0:00   ` William Frye [this message]
1996-10-29  0:00 ` Robert Dewar
1996-10-30  0:00 ` Fergus Henderson
1996-10-30  0:00 ` Matthew Heaney
1996-10-31  0:00   ` Michael F Brenner
1996-10-31  0:00   ` Adam Beneschan
1996-10-31  0:00 ` Jon S Anthony
1996-10-31  0:00   ` Adam Beneschan
1996-11-02  0:00   ` Robert Dewar
1996-11-02  0:00 ` Jon S Anthony
1996-11-05  0:00 ` Jon S Anthony
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox