From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: rm@fabula.de Newsgroups: gmane.lisp.guile.devel Subject: Re: Smart variables, dumb variables Date: Thu, 15 Aug 2002 10:06:43 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <20020815080643.GA8225@www> References: <87y9bajzfp.fsf@zagadka.ping.de> <20020814080715.GA6068@www> <87fzxhteri.fsf@zagadka.ping.de> <20020814202831.GA7443@www> <877kittbdr.fsf@zagadka.ping.de> <20020814210634.GA7220@www> <871y91taen.fsf@zagadka.ping.de> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1029398053 23072 127.0.0.1 (15 Aug 2002 07:54:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 15 Aug 2002 07:54:13 +0000 (UTC) Cc: rm@fabula.de, tomas@fabula.de, guile-devel@gnu.org 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 17fFSN-000600-00 for ; Thu, 15 Aug 2002 09:54:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17fFTI-0008Nk-00; Thu, 15 Aug 2002 03:55:08 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17fFST-0008KV-00 for guile-devel@gnu.org; Thu, 15 Aug 2002 03:54:17 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17fFSR-0008KJ-00 for guile-devel@gnu.org; Thu, 15 Aug 2002 03:54:16 -0400 Original-Received: from www.elogos.de ([212.18.192.92]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17fFSR-0008KE-00 for guile-devel@gnu.org; Thu, 15 Aug 2002 03:54:15 -0400 Original-Received: by www.elogos.de (Postfix, from userid 5001) id 860101049BF; Thu, 15 Aug 2002 10:06:43 +0200 (CEST) Original-To: Marius Vollmer Content-Disposition: inline In-Reply-To: <871y91taen.fsf@zagadka.ping.de> User-Agent: Mutt/1.3.24i Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:1088 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1088 On Wed, Aug 14, 2002 at 11:09:36PM +0200, Marius Vollmer wrote: > rm@fabula.de writes: > > > > I had in mind that the compiler could use the bit to decide if it is > > > allowed to inline some functions (such as '+', 'car', ...) but I no > > > longer think that would be the right way. > > > > Wouldn't that imply that certain functions will never be 'generic' ? > > What do you mean with generic? oops, i forgot to mention goops. I was thinking of GOOPS generic metods: | | (define-generic +) | (define-method (+ (a ) (b )) | (string-append a b)) | | (+ 41 1) | => 42 | | (+ "Foo" "bar") | => "Foobar" | > The way I imagine it, is that you can put declarations on variables > that the compiler is allowed to trust at compile-time, and one such > declaration could be "this variable holds the R5RS primitive procedure > '+' and will always hold it." In the presence of a generic method system (i.e. function dispatch on the type signature of the arguments) this seems to be rather non-trivial, or do you want to propose to make guile a strongly typed language ? > This is a reasonable declaration to > make. The compiler could then inline the fixnum part of '+' and call > out-of-line code for the rest. > > So my next proposal is to add declarations to variables... :-) And a type system ;-) Ralf > -- > GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel