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,25c6c17a48209275 X-Google-Attributes: gid103376,public From: mfb@mbunix.mitre.org (Michael F Brenner) Subject: Re: Generics question Date: 1997/07/24 Message-ID: <5r7cvb$bfb@top.mitre.org>#1/1 X-Deja-AN: 258489340 References: <5r37k9$h4p$1@kelp.mbay.net> Organization: The MITRE Corporation, Bedford Mass. Newsgroups: comp.lang.ada Summary: Passing all the operators is lengthy in nested generic packages Date: 1997-07-24T00:00:00+00:00 List-Id: > To do a general numerical algorithm like you describe the Ada 95 idiom is: > generic > type Numeric_Type is private; > with function "+" (X,Y : Numeric_Type) return Numeric_Type is <>; > with function "-" (X,Y : Numeric_Type) return Numeric_Type is <>; > with function "*" (X,Y : Numeric_Type) return Numeric_Type is <>; > ... etc ... > package Numerics is The etc is not too bad in an unnested generic package, but there is no limit to how big it can get in nested packages, which is why Ada-200X should consider passing packages to packages.