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=0.6 required=5.0 tests=BAYES_00,FROM_WORDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fd63afa4dc364b7e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-30 08:17:46 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!falcon.america.net!newspump.monmouth.com!newspeer.monmouth.com!news.maxwell.syr.edu!newspeer1.nac.net!news.stealth.net!newscon02.news.prodigy.com!newscon01.news.prodigy.com!prodigy.com!newscon07!newscon07!postmaster.news.prodigy.com!newssvr10-int.news.prodigy.com.POSTED!not-for-mail From: "Ken Garlington" Newsgroups: comp.lang.ada References: <98m938$2iod0$1@ID-25716.news.dfncis.de><98pgs1$32up7$1@ID-25716.news.dfncis.de><98umc6$39coj$1@ID-25716.news.dfncis.de> <4mzw6.414$OQ6.73321643@newssvr16.news.prodigy.com> <3ac446f0.1707484@news.cis.dfn.de> Subject: Re: Static typing (Was Re: Better support for garbage collection) Organization: ex-FlashNet, now Prodigy X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: NNTP-Posting-Host: 65.65.210.42 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr10-int.news.prodigy.com 985968796 6207069 65.65.210.42 (Fri, 30 Mar 2001 11:13:16 EST) NNTP-Posting-Date: Fri, 30 Mar 2001 11:13:16 EST Date: Fri, 30 Mar 2001 16:13:16 GMT Xref: supernews.google.com comp.lang.ada:6252 Date: 2001-03-30T16:13:16+00:00 List-Id: "Dmitry Kazakov" wrote in message news:3ac446f0.1707484@news.cis.dfn.de... : On Thu, 29 Mar 2001 23:46:04 GMT, Robert A Duff : wrote: : : >"Ken Garlington" writes: : > : >> "Robert A Duff" wrote in message : >> news:wccvgotscxo.fsf@world.std.com... : : >By the way, the "ulterior motive" in my ideas about literals is that : >what I *really* want is user-defined literals. I think the programmer : >should be able to say "this type here has literals", and define which : >forms are legal for that type, and what they mean. But in order to : >avoid chaos, we can't have the form of the literal affecting overload : >resolution. : : I strongly support your intention (user-defined literals and surely : user-defined aggregates), but I believe that the way is wrong. I would : say that a literal always has a type. And its type should be : determinable from the literal's form. I like the idea that, 1 is a : UNIVERSAL_INTEGER, 1.0 is a UNIVERSAL_FLOAT, Actually, 1.0 is a universal_real (see ARM 2.4:3). : 'a' is a : UNIVERSAL_CHARACTER etc. Don't know exactly what a UNIVERSAL_CHARACTER is; it's an enumeration literal of a character type (ARM 2.5:4). The only universal_types defined in ARM 3.4.1:6 are universal_integer, universal_real, and universal_fixed. : Then if I want to have 1 acceptable as a : value for MY_OWN_INTEGER, or for MY_OWN_FLOAT, or even for : MY_OWN_FILE_DESCRIPTOR, I (or the language, if the type is derived : etc) should simply provide a conversion from UNIVERSAL_INTEGER to my : type. Here you are. IMO the actual problem is not inventing some : complex overloading rules, but supporting type conversions. : : (For purists: there are type conversions in Ada, for instance there is : one from a derived type to its base) : : Regards, : Dmitry Kazakov