From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Catonano Newsgroups: gmane.lisp.guile.user Subject: Re: dynamic-wind Date: Mon, 17 Jul 2017 12:04:19 +0200 Message-ID: References: <20170709135921.0f4890ad@bother.homenet> <59623915.6070104@sapo.pt> <20170709154928.170385a5@bother.homenet> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1500285909 8437 195.159.176.226 (17 Jul 2017 10:05:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Jul 2017 10:05:09 +0000 (UTC) Cc: guile-user@gnu.org To: Chris Vine Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Jul 17 12:05:05 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dX2th-0001qL-Ua for guile-user@m.gmane.org; Mon, 17 Jul 2017 12:05:02 +0200 Original-Received: from localhost ([::1]:49139 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dX2tn-0004rR-Fx for guile-user@m.gmane.org; Mon, 17 Jul 2017 06:05:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dX2t6-0004pb-2Q for guile-user@gnu.org; Mon, 17 Jul 2017 06:04:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dX2t3-00019X-N0 for guile-user@gnu.org; Mon, 17 Jul 2017 06:04:22 -0400 Original-Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:35354) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dX2t3-000192-FH for guile-user@gnu.org; Mon, 17 Jul 2017 06:04:21 -0400 Original-Received: by mail-wm0-x233.google.com with SMTP id w126so70967763wme.0 for ; Mon, 17 Jul 2017 03:04:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bSfbrePVknyXzNlGkbUY7Y+OYzYLWXk22vcIdfoMufk=; b=RCAlQrnoEhkCDv2j8Hg9h7/kN6ZsNBxefLDMu0VvaGwoqkXk72X2Df1g7tkAuJsg4/ Kv53OKP6BAcWMBmL+x01NOxEqVQPE7s5N+EyYYn2Ne/kmeDvuKurRfdaAe8SaPiOJ8EB 9X2DGfMD5oTwvJhqejU6WIgBGnDPL9Zl9m+J6eEUj4lRikcjzq++ru8leQ9DvDqTtOC6 khSv2pBabu2Hk2er81U9vPLxr9xJ9re0prMN1UR3gEAa/Swl/wJe5BYtLJCoI9rDozYB UftsvwRxt/H1+0HqI43oCzWwIKAeRENAPSmaDDjeqlaYX8Mm6up1+4uu+GoqB/DuxVQe 63CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bSfbrePVknyXzNlGkbUY7Y+OYzYLWXk22vcIdfoMufk=; b=LkNwOf/HOKRchoYe3UXITmBHmVfVgQGPflRX+Nv7bkyIbl92MIVObls25m8dDmwBXY BJqD9ZUW9K6lMsr4Fi6kBAWvBCh4Lt+EcTL3JO5Y1eE0lQ+m838DHo71wA5crMGL4uVA p/sJptphCtn1CHseog87M25/bi3yqzbXA9P5HwJBnFH9P6nwoWiMkGad9RHRMEWdndrT /R/jSrQIEidyHWmk78wP4hAqz4SFoFarl2HuFAIG4AjAojkSJsAXdCN/ksOYY38sqeFb A0Bdj5GB9hl7GaWUCwPFUl6KrQYSBw7kwPTlAiYGurTQSyscuRBS81WHX1OSAIPTiWVI HWvg== X-Gm-Message-State: AIVw113iG51wvFqk0GwA1IFDjw3HioGVC1EuP8QOl9ZiT6T/eo8RTmoc tkwjoqR9Vjzzcn5fc7HASz6uz4gTZg== X-Received: by 10.80.140.36 with SMTP id p33mr16948479edp.176.1500285860381; Mon, 17 Jul 2017 03:04:20 -0700 (PDT) Original-Received: by 10.80.157.205 with HTTP; Mon, 17 Jul 2017 03:04:19 -0700 (PDT) In-Reply-To: <20170709154928.170385a5@bother.homenet> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::233 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13944 Archived-At: 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 : > On Sun, 9 Jul 2017 11:09:25 -0300 > V=C3=ADtor De Ara=C3=BAjo 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