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: a07f3367d7,73cb216d191f0fef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.96.225 with SMTP id dv1mr163600wib.6.1364343963473; Tue, 26 Mar 2013 17:26:03 -0700 (PDT) Path: p18ni19746wiv.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.139.MISMATCH!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border2.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Tue, 19 Mar 2013 10:12:14 +0100 Organization: cbb software GmbH Message-ID: References: <51408e81$0$6577$9b4e6d93@newsspool3.arcor-online.net> <11rcs3gg4taww$.bylek8fsshyz$.dlg@40tude.net> <99929f93-b80f-47c3-8a37-c81002733754@googlegroups.com> <87ec4b1d-f7cd-49a4-8cff-d44aeb76a1ad@googlegroups.com> <78103a2f-5d19-4378-b211-1917175d5694@googlegroups.com> <3p6p8k0yfly7.ctazdw7fc5so$.dlg@40tude.net> <1jtvzi1v65aqm.1k5ejsveno59f.dlg@40tude.net> <1hvv2kd9smnfx.6spgz9thd1mh$.dlg@40tude.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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2013-03-19T10:12:14+01:00 List-Id: On Mon, 18 Mar 2013 18:13:39 -0500, Randy Brukardt wrote: > "Dmitry A. Kazakov" wrote in message > news:1hvv2kd9smnfx.6spgz9thd1mh$.dlg@40tude.net... > ... >>> That might be less of a problem than you might think; the 'Read and 'Write >>> should handle the Octet-view while the type as-defined handles the >>> Array-of-[[Wide_]Wide_]Character view. >> >>That would make string tagged, which in turn would imply certain >>representation [embedded tag] and forced by-reference semantics. The >>consequences are far reaching, e.g. you would have to drop slices etc. > > For string, requiring by-reference would have little practical effect, as > almost all compilers pass strings by-reference anyway. There is no OOP-way > to make slicing work, since slices are by definition references (in C-terms, > they're an l-value), and since the representations have to vary, that isn't > going to be possible. It is well possible. Consider tag a constraint as array bounds are. Allow constraints (=discriminants) passed independently as compilers already do for array bounds. This gives you array interfaces while keeping arrays as they are, plain arrays. > My rough proposed Root_String_Type would be an abstract tagged type, I definitely don't want strings tagged. > but it > wouldn't provide slices directly (it would provide functions for that > purpose). But that's OK, because such a construct would have to be alongside > the existing string types; we can't replace or change them in any > significant way and I think that means we'll have to start over. But we can. The point is that the existing type system of Ada is fully compatible with the system I am talking about. There is no compatibility issues. > So we're mostly talking about scalar type 'Class (we > don't need any more anonymous access types of any kind, and they're > essentially structural equivalence as it is, so 'Class would buy very little > there). No, this is a huge difference. Especially for scalar types we need clear interfaces because otherwise programs get infested by a combinatorial explosion of generic instances. Presently, I am unable to compile my project under any 32-bit system because GNAT compiler needs 3GB an more to instantiate all generics, apart from that this takes 3-4 hours on an i7, and the project has hundreds of meaningless packages which only purpose is to instantiate. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de