This is the mail archive of the
guile@cygnus.com
mailing list for the Guile project.
Re: Reader option to permit brackets as parentheses
- To: guile@cygnus.com
- Subject: Re: Reader option to permit brackets as parentheses
- From: Telford Tendys <telford@eng.uts.edu.au>
- Date: Fri, 2 Jul 1999 12:46:16 +1000
- References: <qrrr9mu4tw7.fsf@elwha.cs.washington.edu> <3779AC8E.A5A1BA79@ozemail.com.au> <qrraeth3c92.fsf@elwha.cs.washington.edu> <377AC053.F3E9A1BB@ozemail.com.au> <qrrzp1h2fvx.fsf@elwha.cs.washington.edu> <199907010401.VAA21885@arathorn> <qrroghx2eoe.fsf@elwha.cs.washington.edu> <199907010417.VAA21907@arathorn>
> > (let ([a 1]
> > [b 2])
> > (list a b))
> >
> > It seems a lot easier for students to grasp that there is a binding of
> > values going on inside the first expression of the let special form.
>
> I can easily see how this would help students. People who are comfortable
> with scheme would almost certainly find it more of a hindrance, because the
> []'s suggest that something special is going on (like a read-macro) when in
> fact nothing is. Hmm, wonder about
>
> let
> a 1
> b 2
> list a b
There was someone around a few months back pushing a language that was
indentation based (I went over the web page and got too confused by the
guts of the semantics, all I got out of it was that it was object oriented
and used indentation for bracketing). I kind of liked the idea except
for the lack of TAB support (the indentation detection only supported
spaces). I must say that lisp style indentation ticks me off a bit and
somehow I often find myself with a big row of closing parens at the
end of my functions. Probably the reason that it irritates me is that
I like to use kill-line and paste-line on my editor to move bits of code
around and when I do that in LISP or scheme I always have to go back
and clean up the parens.
Whatever preferences there may be, I agree that the correct way to do
it is write a front-end parser that generates regular scheme and use that
rather than bongle around the normal parser. Getting something similar
to bison and lex going would be really useful (though probably a lot of
work). Could the existing bison be hacked to support scheme output (the
guts of the calculation must be the same whatever the target language)?
- Tel