* Support for $lookup$
@ 2023-11-07 11:51 Panicz Maciej Godek
0 siblings, 0 replies; only message in thread
From: Panicz Maciej Godek @ 2023-11-07 11:51 UTC (permalink / raw)
To: kawa
[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]
I've noticed something weird.
I maintain 3 variants of GRASP: one for Android, one for terminal, and one
that uses AWT.
In both PC versions the Kawa interpreter seems to be initialized when I
start up.
But when I start Android version, I invoke
(let ((scheme ::gnu.expr.Language
(or kawa.standard.Scheme:instance
(kawa.standard.Scheme))))
(kawa.standard.Scheme:registerEnvironment)
(gnu.mapping.Environment:setCurrent
(scheme:getEnvironment)))
in order to be able to use "eval".
Now, the thing is that when the interpreter is initialized in this way, it
doesn't seem to support the $lookup$ syntax properly.
For some time, I used the following definition (provided to the
interpreter) as a workaround:
(define-syntax $lookup$
(syntax-rules ()
(($lookup$ object method)
(lambda args
(apply invoke object method args)))))
but it only handles method syntax and not slot accessing, which I find a
bit annoying.
But - since I recently noticed that the Kawa REPL handles both slot
accessing and method calling, I thought that perhaps there is some module
that I could import in the interpreter to have that syntax working?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-07 11:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-07 11:51 Support for $lookup$ Panicz Maciej Godek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).