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,e81fd3a32a1cacd2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!solaris.cc.vt.edu!news.vt.edu!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Arguments for single-mutex-exclusion on protected types (Was: Does Ada tasking profit from multi-core cpus?) Date: Mon, 26 Mar 2007 19:24:10 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <5iGLh.26236$PF.18838@attbi_s21> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1174951461 378 192.74.137.71 (26 Mar 2007 23:24:21 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 26 Mar 2007 23:24:21 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:b4YfLWGrK/9NO/rbpser+SvsDM0= Xref: g2news1.google.com comp.lang.ada:14645 Date: 2007-03-26T19:24:10-04:00 List-Id: "Randy Brukardt" writes: > Nothing serious, but it's less than ideal: > (1) It complicates the interface; it makes the client worry about something > that they probably don't care about. > (2) It doesn't work for a protected interface (no discriminants); > (3) It doesn't work as well if the protected object is wrapped in a tagged > type, because tagged types can't have defaults on their discriminants - > meaning that it always has to be specified. This also applies to any > protected object that defines an interface (it can have discriminants, but > no defaults, as it is considered tagged). These problems with discriminants go away in Ada 2005, because we have limited constructor functions. A very cool feature, IMHO. - Bob