This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Auto type conversion in target languages
- To: "Marisha Ray & Neil Jerram" <mpriz at dircon dot co dot uk>
- Subject: Re: Auto type conversion in target languages
- From: bickiia at earlham dot edu
- Date: Fri, 24 Dec 1999 14:28:16 -0500 (EST)
- CC: guile at sourceware dot cygnus dot com
- CC: bickiia at earlham dot edu
"Marisha Ray & Neil Jerram" <mpriz@dircon.co.uk> wrote:
>>Short of this I
>>don't see any good solution.
>
>But we could use some kind of reflection to get the basic
>information automatically, where reflection can be either
>documentation-based - type information is snarfed from the
>documentation - or the reflection that GOOPS >currently
>provides for generic functions. The obvious problem with
>GOOPS reflection, though, is that it doesn't apply to most
>existing (non-generic) functions. But when GOOPS is integrated
>into the core, I don't know - (speculating wildly) maybe
>someone has a plan for extending reflection to all functions?
I'm not sure how GOOPS reflection works, but I'd imagine that even
generic functions might have a prefered type. For instance, display
works most Tcl-like on strings -- if you display a port, for instance,
in Tcl a port is just a name for a port (the string representation).
But display can certainly take a port... should it be generic, or should
it prefer a string?
Maybe it's too restrictive to make everything have a default type
(though of course, container functions can't have that).
>>Including type-information in the documentation is a potential way to
>>make all of this transparent to the end-user/programmer and encourage
>>universality.
>
>I don't understand what you mean by transparency and universality
>in this context.
Just that all functions would be accessible to the Tcl programmer, and
it wouldn't require a Tcl-maintainer to go back and document everyone's
functions prefered types.
-- Ian