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.198.210 with SMTP id je18mr19454wic.1.1363918479152; Thu, 21 Mar 2013 19:14:39 -0700 (PDT) Path: p18ni6019wiv.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.81.MISMATCH!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Sat, 16 Mar 2013 18:36:57 +0100 Organization: cbb software GmbH Message-ID: <1jtvzi1v65aqm.1k5ejsveno59f.dlg@40tude.net> References: <8klywqh2pf$.1f949flc1xeia.dlg@40tude.net> <513f6e2f$0$6572$9b4e6d93@newsspool3.arcor-online.net> <513faaf7$0$6626$9b4e6d93@newsspool2.arcor-online.net> <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> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: XRUMb5xlbonTNodERpEXEw.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-16T18:36:57+01:00 List-Id: On Sat, 16 Mar 2013 09:55:53 -0700 (PDT), Shark8 wrote: > On Saturday, March 16, 2013 1:41:27 AM UTC-6, Dmitry A. Kazakov wrote: >> >> Thus either subtypes will have same representation or you >> won't have a class. > > I'm thinking of it more in the terms of generic operations: independent of > representation. Generics are useless for strings [and almost anything else]. Without class-wide objects you need a set of instances for each combination of encoding/character/index. No better than present mess. >> Another problem is that string types must have more >> than one interface to deal with UTF-8 etc. An UTF-8 string is *both* an >> array of Wide_Wide_Character (= Unicode code points) and an array or >> sequence of Character (octets). > > Ah, things get tricky here; Unicode is kind of a bear when you consider > 'characters' because its codepoints aren't necessarily characters. Yes, code points are glyphs. > An > example would be the so-called "combining characters" which you can use > for things like accents or ZALGO-text. (See these, respectively: > http://en.wikipedia.org/wiki/Combining_character and, http://eeemo.net/ ) It is important for rendering only, if anybody uses it. > It would be a big mistake to assume character = code-point when dealing > with Unicode. [...] Rules according to which two texts are considered equivalent can be infinitely complex. You cannot do that on the basis of per character comparison. Character = glyph = code point is good enough for most applications. > I guess what I'm trying to say is that if we did it right, we could > modify/expand the type-system so that something like UNIVERSAL_INTEGER > could be made/explicitly-specified. Arrays must have interfaces. Array interface should vary along the index and element "axes" forming a class. Any type should have a class. It should be possible to drop implementation upon inheritance composing operations with type conversion. That is basically all. It would be fully backward compatible. Actual problems lie elsewhere [MD, parallel type hierarchies]. > In any case; I think it worth considering not just outward/downward > expansion of the language, but inward/upward [unification] as well. Welcome in the club. But in order to be able to weight proposals you need a more or less formal framework to describe language type system. Already this little faces a fierce opposition. So don't expect much. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de