[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Various things

This page is part of the web mail archives of SRFI 48 from before July 7th, 2015. The new archives for SRFI 48 contain all messages, not just those from before July 7th, 2015.

> From: bear <bear@xxxxxxxxx>
> One thing I don't think belongs in this library is the ~p plural.

> That's very specific to English.  And even in English, its sense
> is reversed when you're pluralizing verbs instead of nouns (there,
> the *singular* most frequently has the 's' added and the *plural*
> is most frequently without it).

> This stuff should be locale-dependent, or possibly dynamic, or possibly
> part of a different library altogether.

This is all correct.  The "~P" option dates back to (at least) MacLisp.  
Changing it, e.g. to pretty-print which would be a better mnemonic, would 
potentially break a bunch of code written over the last 20 years.

> To really address it adequately you'd need a semantics that allowed
> function calls determined by the contents of the format string, ...

In this light-weight FORMAT, "~?" is at least a palliative.  One can do some 
interesting things "on the fly".

(format #t  "The wol~?"
	 (language-specific-noun-hack-returning-format-string) wolf-count)
(format #t  " chase~?"
	 (language-specific-verb-hack-returning-format-string) wolf-count)
(format #t  "the boy~? across the snow."
	 (language-specific-noun-hack-returning-format-string) boy-count)

> But I don't think you really want to bite off language-specific
> stuff with this library.

I agree with you.