File type nomenclature in 170 Lassi Kortela (31 Jul 2020 11:11 UTC)
(missing)
Re: File type nomenclature in 170 Lassi Kortela (31 Jul 2020 11:44 UTC)
Re: File type nomenclature in 170 John Cowan (31 Jul 2020 15:21 UTC)
Re: File type nomenclature in 170 Lassi Kortela (31 Jul 2020 15:45 UTC)
Re: File type nomenclature in 170 hga@xxxxxx (31 Jul 2020 16:13 UTC)
Re: File type nomenclature in 170 Lassi Kortela (31 Jul 2020 16:25 UTC)
Re: File type nomenclature in 170 Lassi Kortela (31 Jul 2020 16:36 UTC)
Re: File type nomenclature in 170 hga@xxxxxx (31 Jul 2020 16:59 UTC)

Re: File type nomenclature in 170 hga@xxxxxx 31 Jul 2020 16:13 UTC

> From: Lassi Kortela <xxxxxx@lassi.io>
> Date: Friday, July 31, 2020 10:45 AM
>
> [...]
>
>> I very strongly prefer the predicates to returning a magic symbol,
>
> I don't have a strong opinion one way or the other, so predicates are
> okay. Is the rationale for predicates that their names can be checked by
> the compiler/evaluator, or that predicates can handle types that are not
> disjoint from other types (i.e. a type is a superset of other types)?

Well, they're officially required POSIX sys/stat.h macros:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html

>> I agree with changing "if file is special" to "if file is a device".
>
> Do you agree with merging block and character devices into "device"? The
> distinction is esoteric, and the few people who truly need to care about
> it can look at the raw bits in `file-info:mode`. Windows also has a
> "device" file type but not character or block.

OpenBSD appears to still maintain the distinction:

 0 brw-r-----  1 root  operator    0,   0 Jul 19  2019 wd0a
 0 crw-r-----  1 root  operator    3,   0 Jul 19  2019 rwd0a

Plus several man and FAQ pages did not contradict the above.

I'd be particularly unhappy if we decide to throw it away because
Linux does things its own way (especially since I anticipate mostly
abandoning Linux for OpenBSD in a very few years).  Back in the UNIX™
days it could make quite a difference which you used.

- Harold