This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

can't we all get along? (was: Syntactic sugar and identifier permissivity)



This seems unnecessarily harsh on everyone's side.  I don't think someone
should be criticized _in principle_ for proposing a syntax extension,
wrong-headed or not.  I also think that condemning guile because it doesn't
do things the standard-OO way is too harsh.  Let's calm down, folks!  On
the python newsgroup, for instance, people propose syntax changes all the
time (though none of them ever get implemented :-).

One of the nice things about scheme, as everyone knows, is that it has a
minimal syntax.  Supporting foo,bar or whatever compromises this, but not
entirely without precedent; there is special syntax for "quote" and several
other things.  However, it's clear that no solution is going to please
everyone.  

How about this instead: have a pragma-type function such as
`(use-syntax-extension standard-OO)' at the top of the file which says "the
reader will recognize the construct `foo,bar' as meaning (slot-ref foo
'bar)' [or whatever] in this file".  Thus, if you don't like `foo,bar' you
just don't put that in your file and you refer to slots the standard way.

This might be used later for more substantive syntax extensions when
support for multiple languages comes in.  In that sense, proposing syntax
extensions is very much in the spirit of guile.

BTW Mikael's `(bar foo)' is not bad either, but I find it hard to grok;
it's like saying "the bar belonging to foo".  `foo:bar' is great, though;
does CLOS support this?  My understanding was that `foo' in this case is a
package name; does every instance of a class get its own package name, or
is there one package name per class?  I thought the latter was the case,
which means `foo:bar' doesn't solve the problem addressed here.

Mike


> [ after counting to 10, several times ]
> 
> Lalo Martins <lalo@hackandroll.org> writes:
> 
> > Craig> Stop trolling.
> > 
> > I'm not trolling.
> 
> uh-huh.  first you propose a wrong-headed syntactic extension, and
> then when people explain why it's wrong you say that Guile lacks
> direction.
> 
> but never you mind.
> 
> here's my take on what Guile is: Guile is (not entirely consiously) a
> worse-is-better project.  Guile tries to popularize a good language
> (Lisp in the guise of Scheme) by making it be as friendly to C as
> possible.
> 
> so while this approach makes _implementational_ crocks acceptable,
> _idealogical_ crocks (like fscking up a perfectly good and clean syntax 
> and introducing unnesessary concepts) are not really helpful.
> 
> nobody's forcing you to give up Perl, you know.
> 
> -- 
> One man's constant is another man's variable.
>                 -- Alan Perlis
> 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]