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,1a52c822fc0dbb23 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!news2.arglkargh.de!noris.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Rational for not making cursor tagged in Containers Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1176998738.656903.141250@q75g2000hsh.googlegroups.com> <1177010938.200523.325290@p77g2000hsh.googlegroups.com> <1a8y2vakorfhx.225uqh4hifpd$.dlg@40tude.net> <1xmzi7newnilp.23m3zze8h9yi.dlg@40tude.net> <1177066583.5876.30.camel@localhost.localdomain> <1177080147.5876.87.camel@localhost.localdomain> Date: Fri, 20 Apr 2007 17:13:21 +0200 Message-ID: <1q1kx2jlcvnuj.ck0711mj4few$.dlg@40tude.net> NNTP-Posting-Date: 20 Apr 2007 17:13:21 CEST NNTP-Posting-Host: a17c534f.newsspool2.arcor-online.net X-Trace: DXC=2d\6eZE?7`D0YVY]kmLTlDA9EHlD;3YcB4Fo<]lROoRA8kFO`FQDR_ifh9E X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:15156 Date: 2007-04-20T17:13:21+02:00 List-Id: On Fri, 20 Apr 2007 16:42:27 +0200, Georg Bauhaus wrote: > On Fri, 2007-04-20 at 12:39 +0200, Dmitry A. Kazakov wrote: >> BTW, Ada has private types from the day one. > > If the type in question is private, there is nothing > to argue about. It is private. > To emphasize: I don't want to loose > comparatively simple building blocks (records) just because > some smart programmers can build similar things (implementing > record interfaces) with more effects. I'm not forced to provide > get {} and set {} in C#, and neither assigners in Eiffel. This is confused. Are you talking about composition of types or about usage of? If it is the latter, then you already lost, because prefix notation is used in Ada for gazillion unrelated things. You cannot tell what X.A means without the context. And this is right. If you are talking about the former, then what is lost? You still can use plain records as an abbreviation to: this implements a record interface and surprisingly is also built-it record. > This is where it becomes dangerous, I think. Suggesting that programmers > can implement "linguistic interfaces" forces programmers to be language > designers, profiting from decades of language research, compilation > technology, etc. etc.. Honestly, I don't see what is so especially dangerous in X.A as compared to A(X). >>> Not every programming team consists of real or even wannabe >>> language designers. But who else has even got a chance of knowing >>> what they are doing to a larger program when implementing the >>> concept of record? >> >> Why they are allowed to implement a concept of task, > > Uh, what do you mean? I mean they are allowed to write task type X is but not record type X is (as opposed to type Y is record [X]) IMO, task is far more conceptually complex than a container of fixed number of elements indexed by statically known strings. >> Where do you draw the line? > > For a general purpose language, I draw the line where the > programmers would otherwise be forced to fiddle with > the tiny bits usually done by compilers. The operations > of private types are not tiny bits, but forcing plain record > component assignments to be full subprograms should not be > the default in Ada. Uhm, default of what? I wish to have record interfaces, nothing more. I don't see nothing special in record containers. I cannot understand why a record view should enforce anything on the implementation of, beyond that view. Also I fail to understand why polymorphic objects has to be records and not arrays or access types. Why array or number cannot have discriminants, but records can? Why array element cannot be extracted using X."Foo", and why record item cannot be using X("Foo"). etc. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de