Library name aesthetics Lassi Kortela 03 Nov 2021 07:54 UTC
> Aliases can be easily fit into this. R7RS could support plural names > under (rnrs PLURAL (7)) once a minimal versioning system is established; > SRFI names could be singularized in, say, (srfi SINGULAR), i.e. without > the SRFI 97 ":...". > > Alternatively, R7RS-large could add plural aliases to its (scheme ...) > namespace for compatibility with R6RS and thus paving a way for a > possible later deprecation of the singular names in favor of consistency > (with earlier standards). Interesting ideas. Apart from the singular/plural distinction, there's quite a lot of stylistic difference as well. It would be nice to arrive at a consistent aesthetic (while retaining backward compatible aliases, as you suggest). In particular, the following library names from SRFI 97 are very verbose, probably without adding much clarity. Is "sorting-and-merging" really clearer than "sort"? Rob Pike railed against "variables whose names are small essays on their use" in a similar vein, and practical Scheme programs' import lists tend to get quite long anyway. basic-string-ports [SRFI 6] generalized-set! [SRFI 17] multithreading [SRFI 18] real-time-multithreading [SRFI 21] multi-dimensional-arrays [SRFI 25] basic-format-strings [SRFI 28] with-shared-structure [SRFI 38] eager-comprehensions [SRFI 42] intermediate-format-strings [SRFI 48] compare-procedures [SRFI 67] basic-hash-tables [SRFI 69] lightweight-testing [SRFI 78] sorting-and-merging [SRFI 95] I would prefer the following names, which are more in line with the brevity of RnRS names, and especially R7RS: string-ports set! threads threads [a second time; the SRFI number disambiguates them] format shared ec [all the identifiers have `ec` in their names] format [a second time] compare [all the identifiers have `compare` in their names] hashtables testing sorting One could argue in detail about "thread" vs "threads" vs "threading". R6RS uses sub-libraries in a way that R7RS would consider gratuitous: arithmetic bitwise arithmetic fixnums arithmetic flonums io ports io simple but there are so few of them that it's probably not much of an issue.