Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.c++ Subject: Re: Hello World in Russian Date: Mon, 31 Jan 2022 23:47:59 +0000 Organization: A noiseless patient Spider Lines: 41 Message-ID: <87mtjbbh74.fsf@bsb.me.uk> References: <87tudle826.fsf@bsb.me.uk> <878ruvdgtx.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="f5d105e5673c19dc18ee2409e3f0d08d"; logging-data="30135"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/iEiiYnh9XEs1VrKsAgHJefpbrA+aOeS4=" Cancel-Lock: sha1:cKUkGjmZLMO4qnXCNRTl/SSA25U= sha1:a5uhpqiIuSeaos3R1/xpSUrr+o4= X-BSB-Auth: 1.9b1ed92491248521d330.20220131234759GMT.87mtjbbh74.fsf@bsb.me.uk Xref: csiph.com comp.lang.c++:82892 Muttley@dastardlyhq.com writes: > On Mon, 31 Jan 2022 16:12:58 +0000 > Ben Bacarisse wrote: >>Muttley@dastardlyhq.com writes: >> >>> On Sun, 30 Jan 2022 12:12:33 +0000 >>> Ben Bacarisse wrote: >>>>"Alf P. Steinbach" writes: >>>> >>>>> My opinion is that C (and hence also C++) text mode is an abomination >>>>> that should never have been introduced, and that in addition, given >>>>> that it was introduced, it's designed in a stupid way with the data >>>>> conversion applied underneath the buffer level so that one can't get a >>>>> clear view of the raw data. >>>>> >>>>> As an example, the design means that Unix `cat` can't be faithfully >>>>> implemented in Windows using only standard C or C++, which IMO is >>>>> extreme. >>>> >>>>I assume you are talking about the cases where cat defaults to reading >>>>stdin and/or writing stdout, If so, it could be argued that it's not the >>>>fault of the C and C++ standards, but more the fault of the >>>>implementations not providing a useful freopen function. >>> >>> I see no reason why cat would need freopen because it probably uses low level >> >>> I/O anyway and doesn't care where its stdin is coming from if it has to read >>> from it. >> >>"Low level I/O" is not part of standard C, nor (as far as I know) > > So? Very little is part of standard C if you want to be pedantic and all *nix's > implement open(), read(), write() etc. Unless you thought I meant something > else by low level. Why are you asking me? Ask Alf why he thinks it matters! He brought it up, I just bought up the standard C "solution". -- Ben.