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 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Text_IO, was: Re: Something I don't understand Date: Tue, 18 Feb 2014 10:31:28 +0100 Organization: cbb software GmbH Message-ID: <1mh0lp04e4bzc.vr6hi3fcbba5.dlg@40tude.net> References: <4a3e55f6-9f54-4084-9f37-96efd4b0d349@googlegroups.com> <0b358700-871b-4603-addd-65e07c7d59e5@googlegroups.com> <13cmx8lollig2.1ic40x57wows8$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: I5Na6+WsEzT8WoegI0VZTA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 3306 Xref: number.nntp.dca.giganews.com comp.lang.ada:184988 Date: 2014-02-18T10:31:28+01:00 List-Id: On Tue, 18 Feb 2014 11:00:44 +0200, Niklas Holsti wrote: > On 14-02-18 10:40 , Dmitry A. Kazakov wrote: >> because texts are formatted differently depending >> on the medium. Different mediums deploy integrated mechanisms of >> formatting. E.g. paging is postponed until rendering if the medium is HTML. >> Alignment with proportional fonts is not about fields and decimal places, >> etc. > > Exactly. I meant that the type "Text" would represent text abstractly, > according to its logical structure, not in rendered form. You mean text buffer like in GUI? To me text buffer, stream, file, string are all instances of the class of types over which Put dispatches. OK, we can call the abstract root type of the class "Text." > The final > "Put" would then render according to the output medium. Yes, that Put would be an implementation of the primitive operation defined for the class Text. > Or, if the GUI > and application are split, the rendering might happen in the GUI > process, and the "Put" would just send across some serialization of the > "Text" structure. Yes, however I dislike stateful things, it is difficult to do it otherwise. >> Today there is no way to handle it as single monolithic chunk. >> The way to A) modularize it, B) keep it at the library level, is a better >> type system. No hacks will really help, IMO. > > I think I agree. But I'm still not convinced that multiple dispatch is > necessary, and we may disagree on how to modularize it. I think it is only logical for a strongly typed language to map this kind of stuff onto types. In a language of other type of decomposition, e.g. functional, I would consider other means. But for Ada I really fail to see alternatives. This search for other "ways" (aspects, generics etc) is really damaging the language. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de