| Deutsch English Français Italiano |
|
<100jdlh$2kpbr$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: James Kuyper <jameskuyper@alumni.caltech.edu> Newsgroups: comp.lang.c Subject: Re: encapsulating directory operations Date: Tue, 20 May 2025 22:26:57 -0400 Organization: A noiseless patient Spider Lines: 25 Message-ID: <100jdlh$2kpbr$1@dont-email.me> References: <100h650$23r5l$1@dont-email.me> <20250520065158.709@kylheku.com> <100i2la$292le$1@dont-email.me> <87a5770xjw.fsf@nosuchdomain.example.com> <100j09o$2f04b$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Date: Wed, 21 May 2025 04:26:59 +0200 (CEST) Injection-Info: dont-email.me; posting-host="ee8fba3ee87f784b1a1f64360c6656b7"; logging-data="2778491"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/WaLb2mSWsnxfA+HzOQJ5znDWr913zWzQ=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:2W7jul/SpLHHq2a2Y3D27F2mKIs= Content-Language: en-US In-Reply-To: <100j09o$2f04b$1@dont-email.me> "Paul Edwards" <mutazilah@gmail.com> writes: .... > When C90 was being written - or indeed - when K&R was > being written - if there hadn't been pressure to "bring to market", > would you EXPECT a language standard - any language > standard - but in this specific instance the ISO/IEC 9899:1990 > committee - to have included a standard form of directory > manipulation.> As far as I know, there was never any LOGICAL barrier > to including basic directory manipulation in C90. There is a practical barrier - while C was developed in the context of Unix, which had a lot of influence on the design of C, that design has also always been motivated by a desire to, among other things, be as widely portable as possible. There is a wide variety of different ways to organize memory, and not all of those ways map well to a Unix-like directory structure. The most different structure that I'm personally familiar with is VMS, where the closest equivalent to a Unix directory was versioned. If you specify a directory with a version number, you get that version of that directory (if it exists); if you don't specify a version, by default you get the latest version. I'm sure there are more obscure cases that I'm not familiar with, and at the time when K&R was being written, the variety was even larger. By leaving directory handling up to OS routines, they avoided having to design the relevant C library functions so they could be implemented efficiently on that wide variety of platforms.