From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Elena Newsgroups: gmane.emacs.help Subject: Emacs Lisp style on callbacks? Date: Thu, 21 Oct 2010 07:06:24 -0700 (PDT) Organization: http://groups.google.com Message-ID: <8d9c51ee-0841-4784-b01a-23735110a5d7@s4g2000yql.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1291874349 26438 80.91.229.12 (9 Dec 2010 05:59:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 05:59:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 06:59:04 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQZWw-00071L-LS for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 06:59:02 +0100 Original-Received: from localhost ([127.0.0.1]:44125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQZWv-0000eX-Ke for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 00:59:01 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!s4g2000yql.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 14 Original-NNTP-Posting-Host: 89.96.190.244 Original-X-Trace: posting.google.com 1287669984 17915 127.0.0.1 (21 Oct 2010 14:06:24 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 21 Oct 2010 14:06:24 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s4g2000yql.googlegroups.com; posting-host=89.96.190.244; posting-account=AFCLjAoAAABJAOf_HjgEEEi3ty-lG5m2 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11,gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:181933 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:76768 Archived-At: Hello, this a question about style. I'm writing an asynchronous function which upon completion will execute a callback. Would you suggest using separate callbacks for successful and unsuccessful completion? or would you suggest using the same callback which takes a cons with a success flag as its car? Any other suggestions? I know Emacs Lisp lacks closures: the function would take care of all additional book-keeping. Thank you.