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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable 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!goblin3!goblin.stu.neva.ru!bolzen.all.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Text_IO, was: Re: Something I don't understand Date: Tue, 18 Feb 2014 11:00:44 +0200 Organization: Tidorum Ltd Message-ID: References: <4a3e55f6-9f54-4084-9f37-96efd4b0d349@googlegroups.com> <0b358700-871b-4603-addd-65e07c7d59e5@googlegroups.com> <13cmx8lollig2.1ic40x57wows8$.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net 0Y7ITgK+9sd3z08wCOTbuQHzXTZATcVQ1ru74JdJmBpliTvnQK Cancel-Lock: sha1:bnZcXHSyyTQDvHYAZmaKrQmlk1o= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: <13cmx8lollig2.1ic40x57wows8$.dlg@40tude.net> X-Original-Bytes: 3478 Xref: number.nntp.dca.giganews.com comp.lang.ada:184987 Date: 2014-02-18T11:00:44+02:00 List-Id: On 14-02-18 10:40 , Dmitry A. Kazakov wrote: > On Tue, 18 Feb 2014 09:14:26 +0200, Niklas Holsti wrote: > >> There should really be a type "Text" that represents text, with all its >> complications of encoding, formatting, styles, fonts, lines, paragraphs, >> tabulation, indentation, language, ... True, that is horribly complex, >> but that's reality now. It is debatable if this should be in the >> language, or in toolkits (GUI or others). Probably some core part of it >> should be in the language and the rest in a toolkit or in an optional >> Annex to the language. > > You cannot have that type Misunderstanding, I think... > 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. The final "Put" would then render according to the output medium. 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. > In 80's there were only typewriter's text medium which is why Text_IO looks > as it does. At least, programs in the 80's were expected to produce typewriter text. Typesetting was its own field. But today most programs are expected to produce web or GUI pages with formatting, proportional fonts, etc. > 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. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .