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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e55245590c829bef X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: _Type vs no _Type Date: Thu, 04 Nov 2010 07:06:47 +0100 Organization: Ada @ Home Message-ID: References: <86wroy58ff.fsf@gareth.avalon.lan> <86pqup5xfy.fsf@gareth.avalon.lan> <86y69d3rec.fsf@gareth.avalon.lan> <82lj5c5ecm.fsf@stephe-leake.org> <82zktq4n9b.fsf_-_@stephe-leake.org> NNTP-Posting-Host: 4vQNEkQz8jPZLol/IaLwBQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.63 (Win32) Xref: g2news1.google.com comp.lang.ada:15202 Date: 2010-11-04T07:06:47+01:00 List-Id: Le Thu, 04 Nov 2010 06:28:28 +0100, Nasser M. Abbasi a = =C3=A9crit: > Sorry to jump in, I have not read everything in this thread, so may be= > this was mentioned already. > > Isn't this whole subject a result of Ada being case insensitive? If you see C/C++ as a reference. It is more a result of Ada being withou= t = a separate name-space for types, like Eiffel do. This was previously = explained. > If Ada has been case sensitive, then one would write > > weapon : Weapon; > > and be done with it? > > That is one part of Ada I never liked, same for Fortran or any other > language which is not case sensitive. That is counter intuitive and dangerous. Counter intuitive because =E2=80= =9CURL=E2=80=9D = would become a type. This is dangerous, because when you may easily type= = =E2=80=9CId=E2=80=9D instead of =E2=80=9Cid=E2=80=9D, which may lead int= o a program, which could be = checked as correct, but with a very different behavior (you could even = imagine this as an error introduced on purpose to pirate an application = = from the inside). And then, if one start to play with letter casing to = = distinguish between entities, then there is really a trouble. Could you recommend the following as a good practice ? URL : Location_Type; url : Identifier_Type; -- Illegal after the latter, luckily OK, every one can guess what =E2=80=9CURL=E2=80=9D means. But who can gu= ess what means the = difference in casing ? (only the author can=E2=80=A6 while not sure, he/= she may = forget some time later). I know you probably did not have this kind of tricky usage in mind. But = if = you allow it, be sure this will be used this way sooner or later. This i= s = just to say using casing to distinguish type and instance is even worse,= = because the languages which do that, are case sensitive every where, and= = to have =E2=80=9CURL=E2=80=9D and =E2=80=9Curl=E2=80=9D in the same scop= e, is legal C/C++. So, let Ada be = case insensitive and use _Type, this is not the worst. > But nothing can be done about it, I know. Will never, for the reason given above (I think there is a rational text= = for that, will look for it someday). -- = Si les chats miaulent et font autant de vocalises bizarres, c=E2=80=99es= t pas pour = les chiens.