Email list hosting service & mailing list manager


Re: Prefix, not postfix Taylor R. Campbell 11 Apr 2006 22:29 UTC

   Date: Tue, 11 Apr 2006 18:22:37 -0400
   From: Marc Feeley <xxxxxx@iro.umontreal.ca>

   I'm not sure I understand your point.  I'm advocating for a colon
   suffix.  SRFI 42 uses a colon prefix on identifiers (which by the way
   is illegal in R5RS except for a lone colon).  So keyword objects
   using a colon suffix syntax do not hinder in any way SRFI 42 or any
   R5RS compliant code, but a colon prefix syntax does.

My point is just that changing the meaning of a colon as either a
prefix or a suffix will break some existing R5RS-compliant code.
According to R5RS section 7.1.1, a trailing colon is most certainly
allowed in identifiers:

  <identifier> ---> <initial> <subsequent>* | <peculiar identifier>
  <initial> ---> <letter> | <special initial>
  <special initial> ---> ... | `:' | ...
  <subsequent> ---> <initial> | <digit> | <special subsequent>

Since `:' is a special initial, it is also an initial, and
transitively also a subsequent; it may therefore be used at the end of
an identifier, according to the rule for <identifier>.

   I know that some code has used colon suffixes on identifiers (for
   example the withdrawn iota: function in SRFI 1), but there are very
   few uses of this and it is not portable anyway so I don't think this
   argument has much weight.

Not portable?  Only to Scheme systems that are already non-compliant.
Of the Schemes I use regularly, all allow colon suffixes in
identifiers.