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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: If not Ada, what else... Date: Tue, 28 Jul 2015 15:39:23 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <65061686-5c8f-433b-9b11-9e228298158e@googlegroups.com><87k2u96jms.fsf@jester.gateway.sonic.net><06f8a6f9-d219-4d40-b9ac-8518e93839bd@googlegroups.com><87y4io63jy.fsf@jester.gateway.sonic.net><7a29d3e9-d1bd-4f4a-b1a6-14d3e1a83a4d@googlegroups.com><87mvz36fen.fsf@jester.gateway.sonic.net><2215b44f-8a89-47c6-a4c4-52b74d2dac45@googlegroups.com><9e492c82-868d-43d3-a18a-38274400e337@googlegroups.com><40184feb-4053-4ac3-8eaa-c3bd9cd8a77c@googlegroups.com><10272577-945f-4682-85bc-8ad47f3653ae@googlegroups.com><87si8i81k2.fsf@atmarama.net> <1gsux33dqvjbp$.h0prf7p7g2vn.dlg@40tude.net> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1438115965 15255 24.196.82.226 (28 Jul 2015 20:39:25 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 28 Jul 2015 20:39:25 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:27099 Date: 2015-07-28T15:39:23-05:00 List-Id: "Simon Wright" wrote in message news:ly1tfszqlf.fsf@pushface.org... > "Randy Brukardt" writes: > >> "Simon Wright" wrote in message >> news:lyegk1jk41.fsf@pushface.org... >> ... >>>> Why repeating this flawed syntax for classes? It is again about >>>> fundamentals, privacy is not a type property. It is of a module. >>> >>> Well, as far as I can see protected types, tasks and (in this >>> not-to-be-taken-seriously proposal) classes are modules, in a way. >> >> Why use "sort-of modules" when Ada already has strong, well-designed >> modules? That's the main argument given by the Ada 9x team, and I for >> one have a hard time arguing that. > > What I meant was that protected types, in particular, already have > private parts which are textually, but not programmatically, visible in > the public part of packages. Protected types were intended to look like tasks, and they're clearly a bad design in the sense that they don't mesh well with the existing powerful modularity features. (The subpackage Implementation in the queue containers is exhibit A of that.) Adding a "class type" with similar syntax would have caused the same disaster, only worse. (Ada does *not* allow nested types, thus it would be impossible to encapsulate related types like enumerations and to a lesser extent access types [lesser only because of anonymous access, but that's another mistake -- sometimes two wrongs do make a right - ;-)]. It would be very hard to allow nested types in general [I looked extensively at allowing some kinds of types in the private part of a protected type, and it would work so long as it was quite limited and none of the types was ever visible - still a lot weaker solution than an Ada package]. Randy.