Email list hosting service & mailing list manager

Various things Felix Winkelmann (26 Nov 2003 06:17 UTC)
Re: Various things bear (26 Nov 2003 08:36 UTC)
Re: Various things Felix Winkelmann (26 Nov 2003 09:21 UTC)
Re: Various things Felix Winkelmann (26 Nov 2003 09:26 UTC)
Re: Various things bear (26 Nov 2003 22:41 UTC)

Re: Various things bear 26 Nov 2003 22:41 UTC

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.

To really address it adequately you'd need a semantics that allowed
function calls determined by the contents of the format string, so
somebody could write, eg:

(let ((format-e (lambda (arg) (if (> arg 1) "s" "")))
      (format-b (lambda (arg) (if (> arg 1) "" "s")))
      (format-c (lambda (arg) (if (> arg 1) "ves" "f"))))
   (format "The wol~c chase~b the boy~e across the snow."
             wolfcount wolfcount boycount))

which makes the whole thing into effectively a dynamic-dispatch
system.  Then people working with other languages could define
different format-* forms specific to each target language and take
into account things like masculine vs. feminine, nominative vs.
genitive, and so on.

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

				Bear