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: Wed, 5 Jul 2017 08:14:38 +0200 Message-ID: References: <20170702125831.192ddaec@bother.homenet> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1499235307 24177 195.159.176.226 (5 Jul 2017 06:15:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 5 Jul 2017 06:15:07 +0000 (UTC) Cc: guile-user@gnu.org To: Chris Vine Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Jul 05 08:15:00 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 1dSdaV-0005vt-IG for guile-user@m.gmane.org; Wed, 05 Jul 2017 08:14:59 +0200 Original-Received: from localhost ([::1]:44253 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSdaa-0001yR-Kr for guile-user@m.gmane.org; Wed, 05 Jul 2017 02:15:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSdaE-0001y9-Ci for guile-user@gnu.org; Wed, 05 Jul 2017 02:14:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSdaC-00005e-V6 for guile-user@gnu.org; Wed, 05 Jul 2017 02:14:42 -0400 Original-Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:37237) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dSdaC-00005I-KC for guile-user@gnu.org; Wed, 05 Jul 2017 02:14:40 -0400 Original-Received: by mail-wm0-x22e.google.com with SMTP id i127so155318468wma.0 for ; Tue, 04 Jul 2017 23:14:40 -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=HiaWGe9XDGsWOrU4v554RKhDV1rz7GGFEvzpuNa7nJU=; b=cTQ5VEnBEx97kISIv4lPvJXcM5CwGHUyKfbXHHSvH6jQTC8vGK6h1lSmrh/+YUeZHs BSCFo8cjzza6+eukAXt5QvVVOdKYLG+4jm37jX7p/StHTUdI6HvEAhFtCVT2Tc509IHE vexBpFM6XIAT4mDh2j1cXDqz//pGVB5AGIFWSASt5rhCCblx2B/AgPz7/2cE4tN/oEdB uzBEav9/UJDCVYa4bSQ/w7uxchJ1KiI0B4XVfMSvRdmxeUBEFobbG4qvopjxERPAXnBu CKv/aF/ZmCXhhg1Jun1hhTvTlPLnhPOoluk6+c6iA2ffgdlDxziLzXaXTvdAuA1zHpWt 3+6w== 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=HiaWGe9XDGsWOrU4v554RKhDV1rz7GGFEvzpuNa7nJU=; b=ChI1NbEyPscPB8oNk4XUpaFnOTFChINT2oM/hoUzZSe5x+HmNtdf8KFrJhjCGQ0WKE umkM+NRCwkfuGKcHvb0EPvfQpXAqsNoIW6miIO8y4dHUkIliaslsOmR9ZQnJdC2W8Czy iSjo+maS4VrVzRQu7dasDwqQ78ii82z35X7tVf3Y0rbNJw6eu7Jbl+gWj6NiUbKld4J3 ZBnrCDR+kt1n1eAcgTGRYyVzujavKbkKKy1Yq/Q3jMDS8ZTbATJLgzenrnUbdY+Dpphb yw6rkZ64R8Rq2X/rZNNZAqWPknARnuu7eX90rL1+tF6YXBJy6SvrQz0tcl80xTLea7f+ ouaw== X-Gm-Message-State: AKS2vOwdlztp8EesmOTAEfZSKntKmPnbE4QhlSfcTSecliW9YkzqLtcS HruA0miMxRtPBgQGeZg8zWPftRTMHR5o X-Received: by 10.80.149.133 with SMTP id w5mr20835975eda.82.1499235279416; Tue, 04 Jul 2017 23:14:39 -0700 (PDT) Original-Received: by 10.80.131.4 with HTTP; Tue, 4 Jul 2017 23:14:38 -0700 (PDT) In-Reply-To: <20170702125831.192ddaec@bother.homenet> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22e 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:13895 Archived-At: Chris, thank you for your remarks. Yo're right that I was being caught up by continuations AND that I was probably missing the generality of the concept of dynamic wind And yet, I still want to clarify my point My point is not that the manual is incomplete or inaccurate My point is that the manual does not a good job of _introducing_ people to the concept of dynamic wind Especially people wo have not clear in mind a complete map of the use cases with relative possible solutions. The manual tends to be a very good reference for already educated people. But it's not as good in educating people in the first place, in my view. 2017-07-02 13:58 GMT+02:00 Chris Vine : > On Sun, 2 Jul 2017 08:00:58 +0200 > > aahh I see now > > > dynamic-wind is much more general than just for dealing with database or > network connections, which I think would be a poor focus for the manual. > I was not suggesting to _narrow_ the focus of the manual I was suggesting to use a more mundane example as an _introduction_ to the functionality of dynamic wind The current example could still be given, maybe as the last one A general principle for the Wikipedia pages is to use an informal description first and then move on to more formal discssion later in the page To allow both audiences (interested in a quick overview and interested in a deeper analisys) to be served So I was thinking that the same principle could be used for the discussion of dynamic wind I failed to declare this bakthought of mine, though. That didn't help clarity. I asked Amirouche his opinion about this threas and e raised several more points but he also used this sentence (quoing authorized by Amirouche): "With that thread, I understand the use case of dynamic wind now." So he wasn't understanding dynamic wind before Panicz's explaination That seems to confirm my view that the manual is not a great introduction That said, Amirouche observed that in his Wiredtiger access layer, a state depending on the db is created and when leaving the dynamic wind context that sould be unrolled When reentering it should be properly reproduced He also considered taht probably in his case, the oprtions of leaving the context because of an exception and because of an intentional step should be treated diferently, as you observed > Having said all that, dynamic-wind is not the answer to all cases where > control leaves a block of code non-locally. It is best suited to cases > where invocation of a continuation object or the raising of an > exception fall to be dealt with in the same way, say by releasing a > resource such as by unlocking a mutex or closing a port. But that is by > no means always the case - the invocation of a continuation object is > usually a deliberate programmatic strategy, whereas the raising of an > exception is usually not so and instead represents an unexpected > failure event of some kind in the program. Wrapping up: I concede that dynamic wind is more general than network or dbs, and that doesn't even exhaust the whole range of possible cases (thanks !) But the manual could be improved nonetheless (unless it is meant to NOT be a tutorial) One last note: Amirouche lost this thread in his email client and asked me to post something so he can recuperate this thread and intervene, perhaps