unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* stupid mail about letrec
@ 2002-03-21 17:22 Sebastien.deMentendeHorne
  2002-03-21 23:09 ` Neil Jerram
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastien.deMentendeHorne @ 2002-03-21 17:22 UTC (permalink / raw)


sorry...
have confused letrec and let* (in fact, csi (chicken interpreter) and scheme
(MIT-scheme interpreter, i guess)) gave me the solution I was expecting with
letrec).
Is letrec supposed to have at least the same effect of let* ?

Sébastien de Menten               |    ELECTRABEL 
Tel:  ++32 10 48 51 76            |    Quantitative Analysis, 
Fax:  ++32 10 48 51 09            |    Place de l'université, 16, 4ème étage

Gsm:  ++32 478 789 444            |    B-1348 Louvain-la-Neuve, BELGIUM 

_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: stupid mail about letrec
  2002-03-21 17:22 stupid mail about letrec Sebastien.deMentendeHorne
@ 2002-03-21 23:09 ` Neil Jerram
  0 siblings, 0 replies; 7+ messages in thread
From: Neil Jerram @ 2002-03-21 23:09 UTC (permalink / raw)
  Cc: guile-user

>>>>> "Sebastien" == Sebastien deMentendeHorne <Sebastien.deMentendeHorne@electrabel.com> writes:

    Sebastien> sorry...  have confused letrec and let* (in fact, csi
    Sebastien> (chicken interpreter) and scheme (MIT-scheme
    Sebastien> interpreter, i guess)) gave me the solution I was
    Sebastien> expecting with letrec).

So chicken and MIT-scheme don't give you an error for the letrec
expression that you quoted before?

    Sebastien> Is letrec supposed to have at least the same effect of
    Sebastien> let* ?

No.  letrec is more similar (in my way of seeing things) to let than
to let*.  See R5RS for the details.

        Neil


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 7+ messages in thread

* stupid mail about letrec
@ 2002-03-25 13:02 Sven Hartrumpf
  2002-03-25 16:02 ` Thomas Bushnell, BSG
  0 siblings, 1 reply; 7+ messages in thread
From: Sven Hartrumpf @ 2002-03-25 13:02 UTC (permalink / raw)


>So chicken and MIT-scheme don't give you an error for the letrec
>expression that you quoted before?

No, all return 8 for (letrec ((a 2) (b (* a 4))) b).
Also mzscheme, bigloo, chez, sisc, scsh, gauche, gambit.
Only SCM behaves like guile.
This might make an interesting posting in comp.lang.scheme :-)

_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: stupid mail about letrec
  2002-03-25 13:02 Sven Hartrumpf
@ 2002-03-25 16:02 ` Thomas Bushnell, BSG
  2002-03-25 18:33   ` Per Bothner
  2002-03-25 18:50   ` Marius Vollmer
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas Bushnell, BSG @ 2002-03-25 16:02 UTC (permalink / raw)
  Cc: guile-user

Sven Hartrumpf <Sven.Hartrumpf@FernUni-Hagen.de> writes:

> >So chicken and MIT-scheme don't give you an error for the letrec
> >expression that you quoted before?
> 
> No, all return 8 for (letrec ((a 2) (b (* a 4))) b).
> Also mzscheme, bigloo, chez, sisc, scsh, gauche, gambit.
> Only SCM behaves like guile.
> This might make an interesting posting in comp.lang.scheme :-)

Yes, but it is an error nontheless.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: stupid mail about letrec
  2002-03-25 16:02 ` Thomas Bushnell, BSG
@ 2002-03-25 18:33   ` Per Bothner
  2002-03-25 18:50   ` Marius Vollmer
  1 sibling, 0 replies; 7+ messages in thread
From: Per Bothner @ 2002-03-25 18:33 UTC (permalink / raw)
  Cc: Sven Hartrumpf, guile-user

Thomas Bushnell, BSG wrote:
> Sven Hartrumpf <Sven.Hartrumpf@FernUni-Hagen.de> writes:
> 
>>>So chicken and MIT-scheme don't give you an error for the letrec
>>>expression that you quoted before?
>>
>>No, all return 8 for (letrec ((a 2) (b (* a 4))) b).
>>Also mzscheme, bigloo, chez, sisc, scsh, gauche, gambit.
>>Only SCM behaves like guile.
>>This might make an interesting posting in comp.lang.scheme :-)
> 
> 
> Yes, but it is an error nontheless.

But an error that implementations are not requied to detect.

And it is not unreasonable to consider this an implementation
extension.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: stupid mail about letrec
  2002-03-25 16:02 ` Thomas Bushnell, BSG
  2002-03-25 18:33   ` Per Bothner
@ 2002-03-25 18:50   ` Marius Vollmer
  2002-03-25 19:48     ` Neil Jerram
  1 sibling, 1 reply; 7+ messages in thread
From: Marius Vollmer @ 2002-03-25 18:50 UTC (permalink / raw)
  Cc: Sven Hartrumpf, guile-user

tb@becket.net (Thomas Bushnell, BSG) writes:

> Sven Hartrumpf <Sven.Hartrumpf@FernUni-Hagen.de> writes:
> 
> > >So chicken and MIT-scheme don't give you an error for the letrec
> > >expression that you quoted before?
> > 
> > No, all return 8 for (letrec ((a 2) (b (* a 4))) b).
> > Also mzscheme, bigloo, chez, sisc, scsh, gauche, gambit.
> > Only SCM behaves like guile.
> > This might make an interesting posting in comp.lang.scheme :-)
> 
> Yes, but it is an error nontheless.

However, I think it is an interesting extension.  Internal defines
would behave more 'natural' that way.  It's probably better to define
a new letrec* form, tho, instead of changing the definition of letrec.

_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: stupid mail about letrec
  2002-03-25 18:50   ` Marius Vollmer
@ 2002-03-25 19:48     ` Neil Jerram
  0 siblings, 0 replies; 7+ messages in thread
From: Neil Jerram @ 2002-03-25 19:48 UTC (permalink / raw)
  Cc: Thomas Bushnell, BSG, Sven Hartrumpf, guile-user

>>>>> "Marius" == Marius Vollmer <mvo@zagadka.ping.de> writes:

    Marius> tb@becket.net (Thomas Bushnell, BSG) writes:
    >> Sven Hartrumpf <Sven.Hartrumpf@FernUni-Hagen.de> writes:
    >> 
    >> > >So chicken and MIT-scheme don't give you an error for the letrec
    >> > >expression that you quoted before?
    >> > 
    >> > No, all return 8 for (letrec ((a 2) (b (* a 4))) b).
    >> > Also mzscheme, bigloo, chez, sisc, scsh, gauche, gambit.
    >> > Only SCM behaves like guile.
    >> > This might make an interesting posting in comp.lang.scheme :-)
    >> 
    >> Yes, but it is an error nontheless.

    Marius> However, I think it is an interesting extension.  Internal defines
    Marius> would behave more 'natural' that way.  It's probably better to define
    Marius> a new letrec* form, tho, instead of changing the definition of letrec.

I'm pretty sure there was a big discussion about this a few years ago.

        Neil


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-03-25 19:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-21 17:22 stupid mail about letrec Sebastien.deMentendeHorne
2002-03-21 23:09 ` Neil Jerram
  -- strict thread matches above, loose matches on Subject: below --
2002-03-25 13:02 Sven Hartrumpf
2002-03-25 16:02 ` Thomas Bushnell, BSG
2002-03-25 18:33   ` Per Bothner
2002-03-25 18:50   ` Marius Vollmer
2002-03-25 19:48     ` Neil Jerram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).