Prefix, not postfix Jorgen Schaefer (11 Apr 2006 19:24 UTC)
Re: Prefix, not postfix Per Bothner (11 Apr 2006 19:54 UTC)
Re: Prefix, not postfix Marc Feeley (11 Apr 2006 21:18 UTC)
(missing)
(missing)
(missing)
Re: Prefix, not postfix Ed Watkeys (13 Apr 2006 03:00 UTC)
Re: Prefix, not postfix Donovan Kolbly (11 Apr 2006 21:27 UTC)
Re: Prefix, not postfix John Cowan (11 Apr 2006 21:35 UTC)
Re: Prefix, not postfix Jorgen Schaefer (11 Apr 2006 21:43 UTC)

Prefix, not postfix Jorgen Schaefer 11 Apr 2006 19:24 UTC

Hello!
The SRFI specifies a new kind of datatype, the keyword. Any symbol
can be turned into a keyword by adding a colon to the end.

I think this is a bad idea.

Everywhere else in Scheme, I can recognize the kind of an object
by looking at the start of the name, never by looking at the end.
Postfix is only used as a convention to signify a mutating
operator or predicates. But in that case, the kind of object
doesn't change due to the postfix syntax - it's still an operator.

I don't think that the argument put forth in the SRFI, according
to which a postfix colon is used because that does not conflict
with R5RS, is a good reason to decrease consistency and
readability.

The only remaining argument I can think of in favor of the postfix
colon is that it's more natural to write "foo: bar" - but the same
way Scheme prefers to use prefix math operators for consistence
instead of using the "more natural" infix syntax, I think using
":foo bar" is more consistent with the rest of Scheme.

The ":foo" syntax has precedence in many Scheme implementations,
as stated in the SRFI itself. If we want to standardize on a
keyword datatype and syntax, we should make it consistent with
Scheme, and not just "compatible with R5RS".

Semi-long posting, short summary: If we do indeed have to
standardize keywords, please use prefix colons. :-)

Regards,
        -- Jorgen

--
((email . "xxxxxx@forcix.cx") (www . "http://www.forcix.cx/")
 (gpg   . "1024D/028AF63C")   (irc . "nick forcer on IRCnet"))