unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Damien Mattei <damien.mattei@gmail.com>
To: "Linus Björnstam" <linus.internet@fastmail.se>
Cc: guile-user <guile-user@gnu.org>
Subject: Re: define anywhere
Date: Fri, 11 Jun 2021 10:08:18 +0200	[thread overview]
Message-ID: <CADEOade-ESA26LuOQDpbaCzu0+i_2KqPwKWN8XDjfy2Fqsiv2A@mail.gmail.com> (raw)
In-Reply-To: <f4d8638e-4d0d-4635-9d0a-5063f36a3ba1@www.fastmail.com>

On Sun, Jun 6, 2021 at 3:36 PM Linus Björnstam <linus.internet@fastmail.se>
wrote:

> Oh, my version is an error. I implemented the macro before definitions in
> (some) expression contexts were a thing.
>

do you talk about what? the linked code?

>
> Andy did a marvellous thing implementinf the new letrec: if it is
> possible, letrec will have no overhead. It also automatically handle
> dependant clauses: even though it might seem counterintuitive, the
> guile-proper version will do the right thing always. The syntactic
> differentiation mine does is just there for our feeble human minds, at
> least with regards to what guile-proper is doing.
>
> So TL/DR: guiles way is the correct way.
>
> --
>   Linus Björnstam
>
> On Sun, 6 Jun 2021, at 14:02, Dr. Arne Babenhauserheide wrote:
> >
> > Linus Björnstam <linus.internet@fastmail.se> writes:
> >
> > > becomes ONE letrec under gulie3, whereas my library turns it into
> > > (letrec ((a 2) (b 3))
> > >   (display "hej")
> > >   (letrec ((c 3))
> > >     (+ a b c)))
> > >
> > > That should be an easy fix, again if there is any interest.
> >
> > I’m not sure which approach I prefer. Your approach is more precise, but
> > I slightly lean towards the Guile3-version, because it does not change
> > behaviour when I put a pretty-print between two defines.
> >
> > Though I would want a precise approach inside other forms (like when:
> > separating inside when and outside when).
> >
> > Best wishes,
> > Arne
> > --
> > Unpolitisch sein
> > heißt politisch sein
> > ohne es zu merken
> >
> > Attachments:
> > * signature.asc
>


  parent reply	other threads:[~2021-06-11  8:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 22:27 define anywhere Damien Mattei
2021-06-05  2:10 ` Taylan Kammer
2021-06-05  8:50   ` Dr. Arne Babenhauserheide
2021-06-05 15:23 ` Linus Björnstam
2021-06-06  8:09   ` Linus Björnstam
2021-06-06 12:02     ` Dr. Arne Babenhauserheide
2021-06-06 13:36       ` Linus Björnstam
2021-06-06 16:45         ` Dr. Arne Babenhauserheide
2021-06-11  8:08         ` Damien Mattei [this message]
     [not found]   ` <CADEOadcwk1D9of6C1owQQSqFNRvUmA=wJKSngySbGsfdDUzoMw@mail.gmail.com>
     [not found]     ` <28842df5-d82b-4819-b7ad-2148265f7a83@www.fastmail.com>
2021-06-09  9:29       ` Damien Mattei
2021-06-09 10:11         ` Linus Björnstam
2021-06-11  8:15           ` Damien Mattei
2021-06-11  8:07   ` Damien Mattei
2021-06-11 23:43   ` Damien Mattei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADEOade-ESA26LuOQDpbaCzu0+i_2KqPwKWN8XDjfy2Fqsiv2A@mail.gmail.com \
    --to=damien.mattei@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=linus.internet@fastmail.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).