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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,70414f56d810c10c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.58.162 with SMTP id s2mr82290pbq.20.1316600925394; Wed, 21 Sep 2011 03:28:45 -0700 (PDT) Path: lh7ni1767pbb.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: discriminant questions Date: Wed, 21 Sep 2011 12:29:04 +0200 Organization: cbb software GmbH Message-ID: <1hr3wtnxfjtrl.1h2okoe4n89rm.dlg@40tude.net> References: <9f37b726-d80b-4d24-bf3f-28a14255f7fd@s20g2000yql.googlegroups.com> <86015926-d652-4265-aedd-413312d399f9@dq7g2000vbb.googlegroups.com> <0d272f62-67d0-4905-972c-8a7e912c5531@en1g2000vbb.googlegroups.com> <148cxoyabima2.16mz6xwdph2hj.dlg@40tude.net> <1b7pl1piwc3hl.7q9fyyq8h3m7.dlg@40tude.net> <3d49749a-1da5-49b9-bc68-5d9befb4ed62@hb5g2000vbb.googlegroups.com> <1gti2q424e3tt$.18e95xse1r7j8$.dlg@40tude.net> <862244d4-c7ca-4590-ac97-e2988ac27872@f8g2000yqf.googlegroups.com> <1rffjj30r3vtr.1ahkfeok7ia0w.dlg@40tude.net> <4e79b66a$0$6548$9b4e6d93@newsspool4.arcor-online.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news1.google.com comp.lang.ada:18068 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2011-09-21T12:29:04+02:00 List-Id: On Wed, 21 Sep 2011 12:03:21 +0200, Georg Bauhaus wrote: > Accessors are in the class of very fashionable attractors. Maybe, but that is an argument to irrationality... > Wait! These features do not seem to attract all programmers > alike. For example, Objective-C's dot notation is not welcome > by all Objective-C programmers. So there is some resistance. Dot notation and accessors are different issues. I have nothing against allowing users to use whatever sugar for the operations they define. This by no means limits the interfaces and implementations they choose. On the contrary to that, Accessor is a certain implementation imposed on the programmer, there is no way no express user-defined operations of certain kind otherwise. This is very bad. > Now we see > > Function_Name (P) := ...; I have no problem with this syntax because Ada never tried to syntactically distinguish function calls vs objects and literals vs indexing. Which was right. > Accessors do so by covering mechanism, not showing it. I don't see it this way. What I see is a certain pattern imposed on the programmer. This pattern is an object-oriented one of worst kind of what OOP is hated for, not without a reason. It is amazing how Ada gathers worst patterns around all paradigms in the reach: 1. Accessors = bad OOP 2. Conditional expressions = bad FP 3. Dynamic pre-/post-conditions = bad DbC 4. Generic container library = bad GP ... > We do not even get > > Name [P] := ...; > > which would at least follow the stipulated Ada tradition of > having special syntax for special mechanism! That is a discussion for another day. There nothing special in array indexing. > Aspects increasingly help quickly work around language design. I would not be so sure about that. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de