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

Re: Prefix, not postfix



On 11-Apr-06, at 5:51 PM, Taylor R. Campbell wrote:

I'm posting this merely for the sake of offering another opinion on
legibility; I don't think that any syntax changes in this area are
good, because they can break existing and compliant R5RS code.  For
instance, I've seen this naming convention somewhere: FOO has to do
with an exclusive interval, FOO: with an interval exclusive on the
lower bound and exclusive on the upper bound, :FOO with an interval
inclusive on the lower bound and exclusive on the upper bound, and
:FOO: with an inclusive interval.  For another example, SRFI 42 would
break if the meaning of a colon prefix were changed in Scheme's
lexical identifier syntax, although if any extension were to be made
I'd prefer the colon prefix.

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.

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.

Marc