comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@acm.nospam.org>
Subject: Re: Access idiom
Date: Tue, 22 Jan 2008 18:47:41 GMT
Date: 2008-01-22T18:47:41+00:00	[thread overview]
Message-ID: <gTqlj.47243$Ux2.33478@attbi_s22> (raw)
In-Reply-To: <26cde0d5-2c5e-4316-aad7-95fd7269646a@c23g2000hsa.googlegroups.com>

Gene wrote:
> 
> Another, more succinct explanation...  The graph has many node types,
> all with common ancestor.  Edges are pointers--named or anonymous
> access Node_Type'Class; don't care which.  Required is a primitive
> "transform" procedure that dispatches on node type and must return a
> pointer to an _arbitrary node type_ (i.e. again of type access
> Node_Type'Class).  Frequently the transform should just return its
> parameter without modification.  Using primitive functions (which
> would enable return of anonymous access Node_Type'Class) is not good
> due to need for multiple return values.

In general, I would disagree. The visible part of the package specification 
presents the abstraction to the package client. The rest of the package is the 
implementation of that abstraction. The client should not need to know how you 
choose to implement the abstraction "Edge", and shouldn't have to take special 
action in his application code because you chose a specific implementation.

-- 
Jeff Carter
"Your mother was a hamster and your father smelt of elderberries."
Monty Python & the Holy Grail
06



  parent reply	other threads:[~2008-01-22 18:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-20 19:57 Access idiom Gene
2008-01-21  1:01 ` Ludovic Brenta
2008-01-21  4:16   ` Gene
2008-01-21 15:37     ` Robert A Duff
2008-01-22  4:11     ` Randy Brukardt
2008-01-22  4:11     ` Randy Brukardt
2008-01-21  9:05 ` Dmitry A. Kazakov
2008-01-21 18:15 ` Jeffrey R. Carter
2008-01-22  3:56   ` Gene
2008-01-22  5:10     ` Gene
2008-01-22  9:01     ` Dmitry A. Kazakov
2008-01-22 18:47     ` Jeffrey R. Carter [this message]
2008-01-22  4:15   ` Randy Brukardt
2008-01-22  4:15   ` Randy Brukardt
  -- strict thread matches above, loose matches on Subject: below --
2008-01-21  7:12 Grein, Christoph (Fa. ESG)
replies disabled

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