Deutsch English Français Italiano |
<venqhc$241bk$3@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: David Brown <david.brown@hesbynett.no> Newsgroups: comp.arch Subject: Re: 80286 protected mode Date: Wed, 16 Oct 2024 09:38:20 +0200 Organization: A noiseless patient Spider Lines: 38 Message-ID: <venqhc$241bk$3@dont-email.me> References: <2024Oct6.150415@mips.complang.tuwien.ac.at> <memo.20241006163428.19028W@jgd.cix.co.uk> <2024Oct7.093314@mips.complang.tuwien.ac.at> <7c8e5c75ce0f1e7c95ec3ae4bdbc9249@www.novabbs.org> <2024Oct8.092821@mips.complang.tuwien.ac.at> <ve5ek3$2jamt$1@dont-email.me> <be506ccef76d682d13205c69c761a086@www.novabbs.org> <ve6oiq$2pag3$1@dont-email.me> <ve6tv7$2q6d5$1@dont-email.me> <86y12uy8ku.fsf@linuxsc.com> <jwv34kx5afd.fsf-monnier+comp.arch@gnu.org> <3f2cb127c8d5dc2381fc80631a495e3e@www.novabbs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 16 Oct 2024 09:38:21 +0200 (CEST) Injection-Info: dont-email.me; posting-host="1a23a33dbebf42c526ed71e5fb644606"; logging-data="2229620"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/6BFxS/22pDBReFrFumj+L5C52WYyvKq4=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Cancel-Lock: sha1:dVU4zSAUiTBUbUbf8jT8PNdCtTo= Content-Language: en-GB In-Reply-To: <3f2cb127c8d5dc2381fc80631a495e3e@www.novabbs.org> Bytes: 3316 On 15/10/2024 23:55, MitchAlsup1 wrote: > On Tue, 15 Oct 2024 21:26:29 +0000, Stefan Monnier wrote: > >>> There is an advantage to the C approach of separating out some >>> facilities and supplying them only in the standard library. >> >> It goes a bit further: for a general purpose language, any existing >> functionality that cannot be written using the language is a sign of >> a weakness because it shows that despite being "general purpose" it >> fails to cover this specific "purpose". > > One of the key ways C got into the minds of programmers was that > one could write stuff like printf() in C and NOT needd to have it > entirely built-into the language. It's a very good philosophy in programming language design that the core language should only contain what it has to contain - if a desired feature can be put in a library and be equally efficient and convenient to use, then it should be in the standard library, not the core language. It is much easier to develop, implement, enhance, adapt, and otherwise change things in libraries than the core language. And it is also fine, IMHO, that some things in the standard library need non-standard C - the standard library is part of the implementation. > >> In an ideal world, it would be better if we could define `malloc` and >> `memmove` efficiently in standard C, but at least they can be >> implemented in non-standard C. > > malloc() used to be std. K&R C--what dropped if from the std ?? The function has always been available in C since the language was standardised, and AFAIK it was in K&R C. But no one (in authority) ever claimed it could be implemented purely in standard C. What do you think has changed?