[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Smart variables, dumb variables
From: |
rm |
Subject: |
Re: Smart variables, dumb variables |
Date: |
Thu, 15 Aug 2002 10:06:43 +0200 |
User-agent: |
Mutt/1.3.24i |
On Wed, Aug 14, 2002 at 11:09:36PM +0200, Marius Vollmer wrote:
> address@hidden 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 <string>) (b <string>))
| (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
- Smart variables, dumb variables, Marius Vollmer, 2002/08/13
- Re: Smart variables, dumb variables, tomas, 2002/08/14
- Re: Smart variables, dumb variables, Marius Vollmer, 2002/08/14
- Re: Smart variables, dumb variables, tomas, 2002/08/14
- Re: Smart variables, dumb variables, Marius Vollmer, 2002/08/14
- Re: Smart variables, dumb variables, rm, 2002/08/14
- Re: Smart variables, dumb variables, Marius Vollmer, 2002/08/14
- Re: Smart variables, dumb variables,
rm <=
- Re: Smart variables, dumb variables, Lynn Winebarger, 2002/08/15
- Re: Smart variables, dumb variables, rm, 2002/08/15
- Re: Smart variables, dumb variables, Rob Browning, 2002/08/15
- Re: Smart variables, dumb variables, Marius Vollmer, 2002/08/15
- Re: Smart variables, dumb variables, rm, 2002/08/15
- Re: Smart variables, dumb variables, Marius Vollmer, 2002/08/15
- Re: Smart variables, dumb variables, rm, 2002/08/15
- Re: Smart variables, dumb variables, Marius Vollmer, 2002/08/15
- Re: Smart variables, dumb variables, rm, 2002/08/15
- Re: Smart variables, dumb variables, Neil Jerram, 2002/08/19