From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,23777acd564d513b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-23 09:07:54 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Problem Eliminating constructors Date: 23 Jan 2003 12:08:21 -0500 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <3e274cad$0$33929$bed64819@news.gradwell.net> <3e2da294$0$33926$bed64819@news.gradwell.net> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1043342441 10 128.183.235.92 (23 Jan 2003 17:20:41 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 23 Jan 2003 17:20:41 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:33382 Date: 2003-01-23T17:20:41+00:00 List-Id: porton@ex-code.com (Victor Porton) writes: > In article , > Stephen Leake 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