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.75.82 with SMTP id a18mr91168wiw.0.1366080967295; Mon, 15 Apr 2013 19:56:07 -0700 (PDT) Path: p18ni69668wiv.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!news.teledata-fn.de!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Mon, 8 Apr 2013 10:59:32 +0200 Organization: cbb software GmbH Message-ID: References: <1gnmajx2fdjju.1bo28xwmzt1nr.dlg@40tude.net> <3gv2jwc95otm.pl2aahsh9ox8.dlg@40tude.net> <1gkxiwepaxvtt$.u3ly33rbwthf.dlg@40tude.net> <1fmcdkj58brky.bjedt0pr39cd$.dlg@40tude.net> <1bj564vat3q1j$.1s4d00rlzx4ux$.dlg@40tude.net> <4hzv51v872q2$.1imijbwd7heqm$.dlg@40tude.net> <1htu9idmcci7x.1vr9eafeivqah$.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-04-08T10:59:32+02:00 List-Id: On Mon, 8 Apr 2013 09:48:07 +0200, Stefan.Lucks@uni-weimar.de wrote: > On Sun, 7 Apr 2013, Dmitry A. Kazakov wrote: > >>> If you have mounted different filesystems using different encodings on >>> your system, how on earth should Ada.Text_IO even "know" which encoding to >>> apply? >> >> How is this relevant to the issue that encoding must a part of the type? > > Because even if the implementation of Ada.Text_IO.Open would know the > encoding of the filename, it could do nothing useful with it. ??? It must know the encoding in order to handle the file properly. >>> Yes, this is C-esque of the worst kine. However, what would you expect >>> when making system calls with operation systems written in C? >> >> I expect the type system to handle equivalent types of different >> representations such as UTF-8 and UCS-4 strings. As it already does in the >> case Universal_Integer vs. Integer. Both are distinct types, both have >> different representations, both are considered equivalent in certain cases. > > Universal_Integer is a pseudo-type. With pseudo-values and pseudo-operations used by pseudo-programmers? (:-)) > You cannot define an object O: > Universal_Integer, neither a function returning Universal_Integer ... As if it were relevant. But you are wrong here. Universal types leak into run time through attributes. I.e. you do have objects of universal types at run time in expressions like Integer'Pos (X) * 2 > The only thing that Universal_Integer handles well is a neat way of > defining constants. That is the whole point. It is already here, because it is needed. > The mess with the different string types in Ada is not > just about string constants, it goes much beyond. That is the reason why it should be fixed. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de