Stefan Israelsson Tampe schreef op vr 04-02-2022 om 21:11 [+0100]:
> using an implicit let in conditionals are bad in that you cannot
> escape from the let form which means that you loos
> conditional defines for example in the toplevel. e.g. [...]

While old versions of Guile (Guile 1.8?) did support conditional
defines on the top-level, new versions of Guile (Guile 2.0 and later)
don't:

(if #true
    (define x 'foo)
    (define x 'bar))

While compiling expression:
Syntax error:
unknown file:2:4: definition in expression context, where definitions
are not allowed, in form (define x (quote foo))

The following still works though of course:

(define x (if #true 'foo 'bar))

So for the current version of Guile (3.0.X), there don't appear to be
backwards-compatibility problems in this area.

Greetings,
Maxime.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to