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.4 required=5.0 tests=BAYES_00,SUBJ_ALL_CAPS autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,51359402da60c472 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-02 05:05:43 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: maa@liacc.up.pt (=?ISO-8859-1?Q?M=E1rio_Amado_Alves?=) Newsgroups: comp.lang.ada Subject: Re: DYNAMIC ADA TASK CREATION? Date: 2 Jul 2003 05:05:42 -0700 Organization: http://groups.google.com/ Message-ID: <4a4de33a.0307020405.776c4486@posting.google.com> References: <3EF0026E.2050309@attbi.com> <3EF0F57D.9060507@attbi.com> <3EF15A7C.4030901@attbi.com> <1ec946d1.0306271654.636c1373@posting.google.com> <3EFD42B5.2060707@attbi.com> <0gpvfv49qaa0b62ab5m0kg39kka66sis8t@4ax.com> <1ec946d1.0306300701.77505dcf@posting.google.com> NNTP-Posting-Host: 193.137.36.167 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1057147543 18587 127.0.0.1 (2 Jul 2003 12:05:43 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 2 Jul 2003 12:05:43 GMT Xref: archiver1.google.com comp.lang.ada:39971 Date: 2003-07-02T12:05:43+00:00 List-Id: "Why not: type Element (<>) is limited private;" (Dmitri) "Because the type must be definite, of course! Otherwise, how would you know how much space to allocate for the object?" (Matthew) With the amazing 'Size attribute, of course! What I have *not* figured out yet is how to use the really amazing 'Definite attribute to choose the most efficient implementation automatically (at compile or at run time). Matthew should remember the small talk we had about this in Toulouse. His impression was this is not possible and after a little research that is my impression too. But never loose hope! Namely there is always Ada 2015: -- Don't try this at home! generic type Element_Type (<>) is private; package Unbounded_Arrays is when Element'Definite => new package Unbounded_Arrays_For_Definite_Elements (Element_Type); when not => new package Unbounded_Arrays_For_Nondefinite_Elements (Element_Type); end; Cheers, --Marius