comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephen.A.Leake@nasa.gov>
Subject: Re: Problem Eliminating constructors
Date: 23 Jan 2003 12:08:21 -0500
Date: 2003-01-23T17:20:41+00:00	[thread overview]
Message-ID: <u65sfaj5m.fsf@nasa.gov> (raw)
In-Reply-To: 3e2da294$0$33926$bed64819@news.gradwell.net

porton@ex-code.com (Victor Porton) writes:

> In article <u8yxe5yv2.fsf@nasa.gov>,
> 	Stephen Leake <Stephen.A.Leake@nasa.gov> writes:
> > porton@ex-code.com (Victor Porton) writes:
> > 
> >> It would be nice if Ada0X would allow to make a primitive operation
> >> non-virtual.
> >> 
> >> E.g. we can introduce "pragma Freeze(TYPE)".
> > 
> > How is this better than a nested package?
> > 
> > package Foo is
> >    type Base is tagged private;
> > 
> >    package Constructors is
> >        function New_Base (Params : in ...) return Base;
> >    end Constructors;
> > 
> > private
> >    type Base is ...;
> > 
> > end Foo;
> 
> Very simple: I more like syntax without this additional package
> as it is antinatural.

It's perfectly "natural" in Ada, since it is the only way to do it. It
may not feel "natural" if you are used to some other language.

Is there any other problem with it, that "pragma Freeze (Type)" would
fix? 

-- 
-- Stephe



  reply	other threads:[~2003-01-23 17:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-17  0:19 Problem Eliminating constructors Victor Porton
2003-01-17 15:21 ` John English
2003-01-17 21:10 ` Victor Porton
2003-01-18 15:19 ` Simon Wright
2003-01-20 11:39 ` Rodrigo García
2003-01-20 21:07 ` Victor Porton
2003-01-21  9:44   ` Dmitry A. Kazakov
2003-01-21 19:01     ` Martin Krischik
2003-01-21 11:43   ` Rodrigo García
2003-01-21 15:03   ` Stephen Leake
2003-01-21 13:09 ` Victor Porton
2003-01-22 15:26   ` Rodrigo García
2003-01-21 18:38 ` Victor Porton
2003-01-23 17:08   ` Stephen Leake [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-01-17  6:54 Grein, Christoph
replies disabled

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