From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.help Subject: Re: Differences between Elisp and Lisp Date: Thu, 01 May 2003 05:22:08 GMT Organization: Programmerer Ingebrigtsen Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <5ld6j3io7i.fsf@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1051766808 17812 80.91.224.249 (1 May 2003 05:26:48 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 1 May 2003 05:26:48 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Thu May 01 07:26:46 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19B6ak-0004d2-00 for ; Thu, 01 May 2003 07:26:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19B6Zt-0002Qe-08 for gnu-help-gnu-emacs@m.gmane.org; Thu, 01 May 2003 01:25:53 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!uninett.no!newsfeed1.enitel.no!news.telia.no!not-for-mail Mail-Copies-To: never X-Now-Playing: Cat Power's _Moon Pix_: "Moonshiner" Original-Newsgroups: gnu.emacs.help In-Reply-To: <5ld6j3io7i.fsf@rum.cs.yale.edu> (Stefan Monnier's message of "30 Apr 2003 19:02:09 -0400") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEWxr7QFBgsxIygSDhNa VFcDBAiGXWHCAAACPElEQVR4nHWUUZLbIAyGKeYAVTDvtlAOADjvlKgH8Ga5/1UqgTeTl5LJDOhD +gUSNuZ/YwcIHc4TPkeCm4CzX+MMEEIPOhNw7x8jvGdfAoB4DHyPCEHAeRMlN1m9hFXjDpvMbA6+ n3jZj2WAubA++GymS3UD2DrWwfvMbZvbBlgys8wfr4KUrmgqDsuhHs/Ub9zK9gGszlwAKLWSgmp4 AKfzvwA+kmniK2uCC1jw+QkRxSgr1348HMAh15njpt6mEU0NF0upepLye17CQuFbQfIlq+Xu1wn2 CdwuJzBcbYKXAsQygDfGF82nRTj1CjC+AaTDuGojfDnVKoXg8kga3BZY1cM18Vj1dp85eU0zpgk4 8gBW2kGLxTHdzExLQz1AjtdHnghdtIyWEtYPwAivWhe1u3CB4FUznqurTyQFGmoRj5eottJXNmpn N0L9EnBKHVwKRzWYmQRMj+Rhq6ZBIMmAqqQ1QZQ+EHuUFq4CHEs9FNg93OR2XYHeZTfxky4gZTr0 RsQzs2E9yAgl4lVAiy1QRmlTfmvcqjSWRC5Emmy7gHNcF6P7jobUuNEl7lhqIQckpoZyPpTfFEes TkQqc8wiQnhl5RSQU1EFrTV8A67aglzikceTuoBIav87+rMT5h+QRBwPKVq1CuKHh+UmLwY323Cn XZ7mBc6KmgdtjXLECayCvs4n2/SPTxKw7QOc/Dm0gSz0bzO+EKX4UsojlJJSKfplWAf4ykWzvD9w KCiYHi/pY7HtA+yopu9/VYqhoBBuoM0AAAAASUVORK5CYII= User-Agent: Gnus/5.09002 (Oort Gnus v0.20) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:+YkWZFyvlbmAWja0YKU2Dui/q24= Original-Lines: 34 Original-NNTP-Posting-Host: 80.91.231.2 Original-X-Complaints-To: abuse@enitel.no Original-X-Trace: news.telia.no 1051766528 80.91.231.2 (Thu, 01 May 2003 07:22:08 CEST) Original-NNTP-Posting-Date: Thu, 01 May 2003 07:22:08 CEST Original-Xref: shelby.stanford.edu gnu.emacs.help:112607 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:9104 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:9104 "Stefan Monnier" writes: >>>>>> "Lars" == Lars Magne Ingebrigtsen writes: >> and dispatching functions based on type would be nice. > > Never heard that one. What exactly would you like to see ? The Common Lisp `defmethod' thingie. Which is a part of CLOS, I guess, but wouldn't have to be. But one would need a type system. (defmethod do-stuff ((arg string)) ... do stuff with a string) (defmethod do-stuff ((arg number)) ... do stuff with a number) And then one could just say (do-stuff whatever) here and there. This is really just syntactical sugar on the "pattern" (defun do-stuff (arg) (cond ((stringp arg) ... do stuff with a string) ((numberp arg) ... do stuff with a number))) but it's really useful. Especially when you're able to define your own classes. Er, types. Perhaps eieio already provides this? -- (domestic pets only, the antidote for overdose, milk.) larsi@gnus.org * Lars Magne Ingebrigtsen