World Library  
Flag as Inappropriate
Email this Article
 

Kawa (Scheme implementation)

Kawa
Logo
Developer(s) Per Bothner
Stable release 2.0 / December 2, 2014 (2014-12-02) (w/R7RS compatibility)
Preview release 1.90 beta / October 28, 2014 (2014-10-28) (w/R7RS compatibility)
Written in Scheme / Java
Operating system Cross-platform
Platform Java Virtual Machine
Type Scheme programming language interpreter/compiler
License MIT License
Website https://www.gnu.org/software/kawa/

Kawa is a language framework written in Java that implements the programming language Scheme, and can be used to implement other languages. It is a part of the GNU Project.

The name "Kawa" comes from the Polish word for coffee – a play on words, since Java is another familiar name for coffee.

Contents

  • Integration with Java 1
  • How to use 2
  • See also 3
  • External links 4

Integration with Java

Besides using the Scheme programming language, Java object fields and methods can be accessed using code like this:

(invoke object 'method argument ...)

This will invoke a Java method, and does the same thing as object.method(argument, ...) in Java.

An object's fields can be accessed with:

object:field-name

or

(invoke object 'field)

Static (class) methods can be invoked with the function "invoke-static".

Kawa can be extended with Java code (by creating scheme functions in Java), as well as combined with other JVM implementations.

How to use

To run Kawa on GNU/Linux:

 $ export CLASSPATH=$CLASSPATH:/path/to/kawa/kawa-1.10.jar
 $ java kawa.repl

To compile a Scheme file to a class file, the -C parameter is used:

$ java kawa.repl --main -C file.scm

This will produce "file.class", which can be run by typing "java file". It is also possible to create an applet or servlet (to compile a servlet, "servlet-xxx.jar" must be in the CLASSPATH variable).

See also

External links

  • Official website
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.