comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Subprogram Renaming
Date: 1996/04/10
Date: 1996-04-10T00:00:00+00:00	[thread overview]
Message-ID: <dewar.829163957@schonberg> (raw)
In-Reply-To: 316BC3D6.14E7@csehp3.mdc.com

James Squire asks

"2.  Once again, the real question is:  why do I need an explicit body
for j when I can rename k in the spec of q?  That has been my question
all along."

That's very easy to answer (and to my reading has been answerd several
times already in this thread).

YOu put something in the spec if it is part of the specification. One
can imagine cases where it is part of the spec that A renames B, as for
example when you deliberately have two names for the identical same
operation.

But if the renaming is essentailly just a choice of how a particular
function is implemented then it is a serious violation of the abstraction
to expose the renaming.

For example, it a package providing set abstractions, I would not like
to see:

  Is_Member (E : Element; S : Set) return Boolean
     renames Binary_Tree_Ops.Test_Item_Present;

since it is none of my business that at the moment sets are implemented
using the binary tree package.





  reply	other threads:[~1996-04-10  0:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <md5:95D854EBD1A47E0E86027A3CC7DBD9A4>
1996-04-10  0:00 ` Subprogram Renaming James A. Squire
1996-04-10  0:00   ` Robert Dewar [this message]
1996-04-11  0:00     ` Jonas Nygren
1996-04-11  0:00       ` Robert Dewar
1996-04-12  0:00         ` Jonas Nygren
1996-04-10  0:00   ` Robert A Duff
1996-04-11  0:00     ` Adam Beneschan
1996-04-11  0:00       ` Robert A Duff
1996-04-11  0:00       ` Robert Dewar
1996-04-10  0:00 ` johndoe
     [not found] <md5:3CC2294B6049DDBD8790280EABCEDE81>
1996-04-12  0:00 ` James A. Squire
     [not found] <md5:87494FB95037B9578F62831DE10B6BB3>
1996-04-10  0:00 ` James A. Squire
     [not found] <md5:88A5E8822105A2023A0A951BB5EC646E>
1996-04-10  0:00 ` James A. Squire
     [not found] <md5:FE4AB546A8392541EDC1E3FE12E3D8AF>
1996-04-09  0:00 ` James A. Squire
1996-04-09  0:00   ` Robert Dewar
1996-04-10  0:00   ` Robert A Duff
1996-04-11  0:00   ` Mark A Biggar
1996-04-10  0:00 ` johndoe
1996-04-10  0:00   ` Norman H. Cohen
1996-04-11  0:00     ` Norman H. Cohen
1996-04-12  0:00       ` Jonas Nygren
1996-04-12  0:00         ` Norman H. Cohen
1996-04-13  0:00           ` Robert A Duff
1996-04-15  0:00             ` Norman H. Cohen
     [not found] <md5:046A59600C3FEFC327385C3E914D6997>
1996-04-08  0:00 ` James A. Squire
1996-04-08  0:00   ` Robert Dewar
1996-04-09  0:00     ` Gary McKee
1996-04-09  0:00   ` Robert A Duff
     [not found] <md5:C24D8C2EE138D9627FB8B93E2E35D9F3>
1996-04-05  0:00 ` James A. Squire
1996-04-06  0:00   ` Robert Dewar
replies disabled

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