comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com
Subject: Re: Help - Constructors - ASAP.
Date: 1998/07/27
Date: 1998-07-27T00:00:00+00:00	[thread overview]
Message-ID: <6pi4jq$j73$1@nnrp1.dejanews.com> (raw)
In-Reply-To: m3lnpg7j5s.fsf@mheaney.ni.net

In article <m3lnpg7j5s.fsf@mheaney.ni.net>,
  Matthew Heaney <matthew_heaney@acm.org> wrote:
> If the return type is tagged, then do NOT return the specific type as
> the return type of the function.  Either return the classwide type, or
> declare the constructors in a nested package called Constructors.  This
> way, the functions won't be primitive operations for the type, and
> therefore won't be inherited during derivation.

Hmm. You have probably been through this more than I, but it would think it
would be useful in some circumstances to have the function be inheritable. If
you need a new version of the "constructor" for a new derived type, you can
override the old one and the client won't be able to call the old one anymore.
If you make the original "constructor" class-wide instead, clients will always
be able to call it with any derived type.

T.E.D.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum




  reply	other threads:[~1998-07-27  0:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-23  0:00 Help - Constructors - ASAP Maxim Senin
1998-07-26  0:00 ` Matthew Heaney
1998-07-27  0:00   ` dennison [this message]
1998-07-30  0:00     ` Robert I. Eachus
1998-07-30  0:00       ` tedennison
1998-07-31  0:00         ` Matthew Heaney
1998-07-31  0:00         ` Mats Weber
1998-07-31  0:00           ` Robert I. Eachus
1998-08-01  0:00             ` Matthew Heaney
1998-07-31  0:00           ` dennison
1998-08-01  0:00             ` Matthew Heaney
1998-08-01  0:00             ` Robert Dewar
1998-08-01  0:00               ` Matthew Heaney
1998-08-03  0:00             ` Mats Weber
1998-08-01  0:00       ` Robert Dewar
1998-08-01  0:00         ` Matthew Heaney
1998-08-03  0:00           ` Mats Weber
1998-08-03  0:00             ` Matthew Heaney
1998-08-03  0:00               ` Mats Weber
1998-08-04  0:00                 ` Matthew Heaney
1998-08-04  0:00                   ` Mats Weber
1998-08-05  0:00                     ` Matthew Heaney
1998-08-10  0:00           ` Robert I. Eachus
1998-08-03  0:00         ` tedennison
  -- strict thread matches above, loose matches on Subject: below --
1998-07-15  0:00 Maxim Senin
1998-07-16  0:00 ` Stephen Leake
replies disabled

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