guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dynamic-wind


From: Catonano
Subject: Re: dynamic-wind
Date: Mon, 17 Jul 2017 12:04:19 +0200

I'm so glad for all the people who intervened in this discussion

As this made the subtleties of the issue clearer.


Thank you people !

2017-07-09 16:49 GMT+02:00 Chris Vine <address@hidden>:

> On Sun, 9 Jul 2017 11:09:25 -0300
> Vítor De Araújo <address@hidden> wrote:
>
> unwind-protect is a dynamic-wind without the in guard.
>
>
>
[...]


> As I said, dynamic-wind is a very blunt instrument.  I find it useful
> only for very local resources of a particular kind.  Releasing a mutex
> is a common case where dynamic-winds are useful (guile has the
> with-mutex form).  Ports, as in your example, are not as clear cut.
> Sure, you may want to close the port when you exit a particular block
> in the case of a normal exit, an exception or an escape continuation,
> but do you necessarily want to do so if you might re-enter later and
> closing the port is a destructive operation (it vacates input buffers)?
>
>
In my particular case, I think that abruptly closing the file and then
reopening it would be an acceptable trade off

Freexl functions return error codes when problems arise and those could
help the user in assessing the problem

xls files can be corrupted as different versions of Office can save them in
inconsistent states and there's only so much my library can do

Thank you again, people


reply via email to

[Prev in Thread] Current Thread [Next in Thread]