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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d1df6bc3799debed X-Google-Attributes: gid103376,public From: jsa@alexandria (Jon S Anthony) Subject: Re: Syntax for tagged record types (was Re: Not intended for use in medical,) Date: 1997/05/23 Message-ID: #1/1 X-Deja-AN: 243468825 Distribution: world References: <3.0.32.19970423164855.00746db8@mail.4dcomm.com> <33828299.2A3@world.std.com> <33850721.49BF@sprintmail.com> Organization: PSI Public Usenet Link Newsgroups: comp.lang.ada Date: 1997-05-23T00:00:00+00:00 List-Id: In article mheaney@ni.net (Matthew Heaney) writes: > >Another issue with discriminants as constructor parameters is that there > >is no provision for having multiple overloaded constructors with > >different sets of parameters. > > Which is precisely the reason for having named constructors. The > parameters alone don't tell you enough information. Not being able to give > the different constructors for a type a descriptive name was cited as a > criticism of C++ in Joyner's paper. This is a non issue for anything other than a limited type. You can name your constructors whatever you want, they can take any number of parameters and there can be any number of them. For limited types, the only way around this is to hide them behind access types for them. Then things again work just fine - except for storage management issues. Hence, the need for GC. Limited types are really extremely useful. Unfortunately, much of this is lost without GC support. /Jon -- Jon Anthony Organon Motives, Inc. Belmont, MA 02178 617.484.3383 jsa@organon.com