Mon 19 Mar 2007 01:54:32 AM UTC, comment #2:
| From: Per Bothner <INVALID.NOREPLY@gnu.org>
| Date: Fri, 16 Mar 2007 17:20:31 +0000
|
| Hm. In Kawa require is syntax. It basically is a compile-time "import
| module" statement.
Programs call SLIB REQUIRE with a quoted argument; so that may serve
to distinguish the cases.
| However, the other complication is thta Kawa uses a "colon notation" for
| various purposes. Basically:
| foo:bar
| -means get the compoent with (literal) name bar if the value of
| (evaluating) foo.
Kawa seems to be going it alone on this one. I don't know of any
other Scheme using ":" this way; and the nascent R6RS is not doing so.
Can you provide some read-time control to make ":" just a normal
character in symbols?
| Kawa does have some "compatibility hacks": If the compiler sees a
| defining for the name |foo:bar| (and no definition of the symbol
| |foo|) it will then treat foo:bar as referring to the former
| definition.
There are many functions in SLIB which are defined both with a prefix
and without a prefix. Is it okay if |foo:bar| and bar (as opposed to
|bar|) are defined?
We could write a program which creates Kawa copies of all the SLIB
modules having their ":" symbols wrapped in "|"s.
| I'm in the process of trying to clean up top-level declaration, and
| specifically the interaction between the run-time environment and
| the compile-time top-level scope, so this stuff may change a bit.
| In fact, it is possible what you've experienced may be something
| that should be fixed.
|
| Kawa is focused on compilation. I've imported a few slib packages
| - see gnu/kawa/slib.
I compared "printf.scm"s; nearly all the changes were from the SLIB
side, mostly character constants. Only two Kawa declarations were
added -- I don't think they would make any significant difference.
The function starting:
(define-constant (stdio:round-string (str :: <string>) ndigs strip-0s)
(let* ((n (- (string-length str) 1))
...
really shouldn't need to declare STR because the first call with
STRING-LENGTH clearly constrains STR to be a string.
As for DEFINE being renamed DEFINE-CONSTANT, that could be done by
rewriting the files at installation time. SLIB's functions
FILE->EXPORTS or FEATURE->EXPORTS can be used to discover which
functions are exported (is that the relevant distinction?).
| I'm open to changes to the Kawa system so Kawa can support slib
I have submitted two bugs for the issues gating Kawa/SLIB.
| out-of-the box, ideally without an init file.
Okay. Would this involve SLIB being part of Kawa.jar? Not anchored
in a filesystem, and lacking GETENV, locating SLIB from Java is
difficult.
SLIB allows any implementation to integerate its compiled SLIB modules
(and non-SLIB modules). SCM creates its catalog entries in
http://cvs.savannah.gnu.org/viewcvs/scm/scm/mkimpcat.scm?view=markup
which, supporting 4 types of dynamic linking, is more complicated than
a mkimpcat would be for other Scheme implementations.
|