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 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,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsfeed2.dallas1.level3.net!news.level3.com!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: _Type vs no _Type Date: Fri, 05 Nov 2010 13:24:09 -0400 Organization: The World Public Access UNIX, Brookline, MA 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: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1288977832 15877 192.74.137.71 (5 Nov 2010 17:23:52 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 5 Nov 2010 17:23:52 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:nQ6ydv0gEpHTiiEuxkehkY7dRHc= Xref: g2news1.google.com comp.lang.ada:15269 Date: 2010-11-05T13:24:09-04:00 List-Id: "Nasser M. Abbasi" writes: > Isn't this whole subject a result of Ada being case insensitive? > > If Ada has been case sensitive, then one would write > > weapon : Weapon; You don't need case sensitivity to allow "weapon: Weapon;". Nor do you need separate namespaces for types, as some have suggested. A language could allow overloading of object and type names, and determine what you mean by context. And have some syntax for disambiguation when necessary (like Ada does with qualified expressions). In Ada, you can say "F(f(X));" and it's clear from the syntax that the first F is a procedure name, and the second f is a function name. Likewise, in "not Ada", it might be clear in "weapon: Weapon;", the first one declares an object name, and second one is a type name. Something would have to be done about "Mumble'First" and the like. I'm not advocating for or against the idea -- just pointing out some language design issues. By the way, I don't like case sensitivity, and I don't like case insensitivity, either. A better rule is the one implemented by GNAT in its default mode (or with -gnatwe). - Bob