From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: taylanbayirli@gmail.com (Taylan Ulrich B.) Newsgroups: gmane.lisp.guile.user Subject: Re: Syntax-rules generate symbol Date: Tue, 10 Sep 2013 11:16:12 +0200 Message-ID: <87bo41hw9v.fsf@taylan.uni.cx> References: <87txhuarxf.fsf@gnu.org> <871u4xdaow.fsf@taylan.uni.cx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1378804612 30934 80.91.229.3 (10 Sep 2013 09:16:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Sep 2013 09:16:52 +0000 (UTC) Cc: "guile-user@gnu.org" , Dmitry Bogatov To: Panicz Maciej Godek Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Sep 10 11:16:54 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VJK46-00081O-Cq for guile-user@m.gmane.org; Tue, 10 Sep 2013 11:16:54 +0200 Original-Received: from localhost ([::1]:56552 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJK45-0002Hi-VF for guile-user@m.gmane.org; Tue, 10 Sep 2013 05:16:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJK3s-0002HN-9u for guile-user@gnu.org; Tue, 10 Sep 2013 05:16:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJK3m-0006ML-CF for guile-user@gnu.org; Tue, 10 Sep 2013 05:16:40 -0400 Original-Received: from mail-ee0-x22f.google.com ([2a00:1450:4013:c00::22f]:41967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJK3m-0006MG-1z; Tue, 10 Sep 2013 05:16:34 -0400 Original-Received: by mail-ee0-f47.google.com with SMTP id d49so3734311eek.34 for ; Tue, 10 Sep 2013 02:16:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=7IMxuRXISmHnU4anVMLDDZMuoGvoNpjJ2AB+6uNe/a4=; b=Sx3ZLxfEUDkVNYRhxZN46+h46Hfsfxz7oacJt/06rzGMkIGvW5kwiiWYKvrbzBcqwk 39BDpagxERG4rPgQW2F9OvjI2fyDWZVLOjXdlH2AnOYrwY+B/xljnMqVrQCZrne4CV2J lmxSTXa9yo/fan+Thk1zFivl1zo9RcxM8OljXqQDspUNs77Um1YkB47ifh/2aggf0nee ey+dkyRgkjqF7DToBbhooCqGkcUPPRbz6Jj85APckwIj2aeFcQUuJrbIOeiBCkqcg2om jftDj5RkF2fk3WUAxOywJ67EyYpZJBfqE9xsZqkw4dY3fnSs4FYlzRzX6XCMj8W71bD5 lVkA== X-Received: by 10.14.218.197 with SMTP id k45mr37779029eep.32.1378804593013; Tue, 10 Sep 2013 02:16:33 -0700 (PDT) Original-Received: from taylan.uni.cx (p4FD91846.dip0.t-ipconnect.de. [79.217.24.70]) by mx.google.com with ESMTPSA id f49sm29664860eec.7.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 10 Sep 2013 02:16:32 -0700 (PDT) In-Reply-To: (Panicz Maciej Godek's message of "Tue, 10 Sep 2013 08:11:09 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::22f X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 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-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10782 Archived-At: Panicz Maciej Godek writes: > I assume that the main reason for using this is efficiency (rather > than simplicity), because allegedly guile's continuations are rather > inefficient. > > On one hand, it's good to know that (and would be even better > to be able to find it out by skimming section 6.13 of the manual), > but on the other it would be nicer if the compiler could trace the > usages of continuations and figure out whether a given one is > ever being re-entered, and optimize accordingly. Delimited/composable continuations don't have the efficiency problems of call/cc (some of which are inherent, and not related to Guile, from what I know), and I'd urge anyone to read the following critique of call/cc revealing other problems with it as well. :) http://okmij.org/ftp/continuations/against-callcc.html Guile supports "prompts" as the primitive behind higher-level delimited continuation operators, escape continuations, exceptions, etc. The relevant manual section is a nice read, though it might require more than a quick skim: (info "(guile) Prompts") The compiler might be able to optimize some usages of call/cc into the more efficient use of a delimited continuation, but after reading about call/cc and delimited continuations, it becomes a rather blurry line (IMO) which generalizes which, and on the meanwhile I find it most nice to use the abstraction that expresses the actual idea as directly as possible. And since breaking from a loop or returning from a block are inherently escape-only actions, I think it's actually nicer to use `let/ec' for those cases even in terms of code clarity etc.