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,d0490497bd8e3f95 X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Syntax for tagged record types Date: 1997/05/27 Message-ID: #1/1 X-Deja-AN: 244254610 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1997-05-27T00:00:00+00:00 List-Id: Robert Dewar (dewar@merv.cs.nyu.edu) wrote: : Matthew says : <> : Most people find the use of discriminants as "constructor arguments" a : natural and powerful feature in Ada (though naturally they don't think : in terms of this terminology). One important thing to keep in mind. Discriminants are only arguments to the "default-initializing constructor" (the default expressions for the components plus the optional procedure Initialize). If you have more complicated kinds of "explicit" initialization in mind, then by all means write a (parameterized) function or procedure to do the work. Also, if you look at how constructors are used in other OO languages, you will often find their parameters are used to control things like size or data structure variant. In these cases, you have a practically direct match to the use of discriminants, even in the Ada 83 world. -- -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Burlington, MA USA