Kawa is an implementation of the Scheme language , a dialect of the Lisp language , which provides tight integration with the java environment [1] [2] .
| Kawa | |
|---|---|
| Type of | Scheme programming language interpreter / compiler |
| Developer | Per bothner |
| Written on | Scheme / Java |
| operating system | Cross platform |
| First edition | |
| Hardware platform | Java virtual machine |
| Latest version | 3.0 ( October 2, 2017 ) |
| License | MIT License |
| Website | gnu.org/software/kawa/ |
It includes both an interpreter [3] and a compiler in the Java Virtual Machine (JVM) code [4] .
In addition, Kawa is a framework for implementing high-level dynamic languages. So, with its help, XQuery (Qexo [5] ) [2] and Emacs Lisp (JEmacs [6] ) [1] are implemented .
Java Integration
One of the features of the Scheme dialect implemented in Kawa is the ease of access to Java objects.
To call the method of the object, the following code is used:
(invoke object 'method argument ...)
This will make an object method call, i.e. an action similar to object.method (argument, ...) will occur in Java.
To access the fields of an object:
object: field-name
or
(invoke object 'field)
The static methods of the class are called using the invoke-static function.
Kawa allows you to create lisp functions in the Java language.
Notes
- ↑ 1 2 Per Bothner. Compiling Java with GCJ // Linux Journal . - 2003. - January 1.
- ↑ 1 2 Mensah, 2011 .
- ↑ The following commands are used to run Kawa on Linux :
export CLASSPATH = $ CLASSPATH: /path/to/kawa/kawa-1.10.jar java kawa.repl
- ↑ To compile the Scheme file.scm file into a file of the file.class class, you need to use the
-Coption:java kawa.repl --main -C file.scm - ↑ Qexo - The GNU Kawa implementation of XQuery
- ↑ JEmacs - the Java / Scheme-based Emacs Text Editor
Literature
- Kuassi Mensah. 5.2.3. Proof of Concept # 3: Running Kawa (Scheme) in the Database // Oracle Database Programming using Java and Web Services . - Digital Press, 2011 .-- 1121 p. - ISBN 9780080525112 .