Andy Wingo <[email protected]> writes:
> On Wed 07 Oct 2009 22:27, Neil Jerram <[email protected]> writes:
>
>> On a loosely related point, I notice that we have deprecated eval-case
>> in 1.9.x, in favour of eval-when. But 1.8.x only has eval-case; so
>> isn't the deprecation going to make it more difficult to handle code
>> that has to be different in 1.8.x and 1.9/2.0?
>
> Perhaps, though if you are updating already to 2.0, I would just make a
> 2.0 compatibility library, as far as possible.
Yes, you're right. I think I was a bit confused when I wrote the above,
thinking that eval-case/eval-when was something like cond-expand. In
fact Ludovic's suggestion for (cond-expand (guile-2) ...) will be
enough.
> In macros you could do the @/@@ trick.
>
>> (For example, 1.8.x requires the comma trick in a macro definition that
>> uses a non-exported procedure from the same module, whereas 1.9/2.0
>> requires not using a comma.)
>
> See NEWS line 282 :)
Nice entry!
> And add something or propose new behavior, as appropriate.
I don't think we need anything else. People can use @@ if they want
code that works in both 1.8.x and 2.0, or cond-expand for different
versions.
>> Alternatively, should we add a suitable eval-when to the next 1.8.x
>> release, to help with this?
>
> I think that would be a good idea, yes.
As Ludovic said, that would only help 1.8.8 and onwards. I think it
would be better to add this to a compatibility library, as and when it's
needed.
Neil