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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5ac1c1813029999b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-15 15:08:08 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!uunet!sea.uu.net!sac.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: A bunch of questions that come after "Hello world" User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Fri, 15 Nov 2002 23:07:28 GMT Content-Type: text/plain; charset=us-ascii References: <5ad0dd8a.0211131244.42603699@posting.google.com> <5ad0dd8a.0211140218.6d48be15@posting.google.com> <5ad0dd8a.0211150950.4d550163@posting.google.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Organization: The World Public Access UNIX, Brookline, MA Xref: archiver1.google.com comp.lang.ada:30968 Date: 2002-11-15T23:07:28+00:00 List-Id: wojtek@power.com.pl (Wojtek Narczynski) writes: > I't just that protected type, task type and record type are all > composite types, and you can put a function or procedure inside a > protected or task type, but you cannot do this inside a record. So you > sometimes declare them outside and sometimes inside. Don't you find it > it's weird? Yes. If I were designing the whole language from scratch, I would put them all *outside*, including the protected type case. (I would also eliminate task entries, so the issue would not arise there.) Part of the reason for these things is history. Ada tasks were originally just tasks -- there were no task types. Similar to the way packages are not "objects" -- there are no "package types". This was around 1980 or so. Task types were added before the 1983 standard. Protected types (added in Ada 95) were somewhat modeled after tasks, and so inherited some of the oddities. >...Thought that maybe I am missing something. Dynamic > dispatch on multiple attributes is the reason I got interested in Ada, > but still putting a function inside a record would be good, such a > calculated record member. Ada does not support multi-dispatch. If you have two controlling operands, they both have to have the same tag. - Bob