This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Auto type conversion in target languages


From: Jorgen `forcer' Schaefer <forcer@mindless.com>
>If in the tcl world someone says
>   double "100"
>then foo can quite plausibly return 200, but the tcl reader for
>Guile has no idea that double wants a number not a string.
>
>Has anyone any thoughts about this?


Yes.  I don't understand why the Guile/tcl reader needs to know that double
expects a number.  It is double that needs to know this: its implementation
should convert its argument to a number.  As far as the reader is concerned,
it looks like a string, so it should be read as a string.

But I suspect I may have misunderstood how you envisage the implementation
of Tcl procedures like double.

    Neil



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]