message = "Hello world"; println message;
- Library documentation: std, io, json, xml
- Read the tutorial (also available as PDF)
- Language reference manual (PDF)
- Source is available through git (ant is needed for building):
git clone git://github.com/mth/yeti.git(BSD licensed)
- Yeti code evaluator in web
- Chrisichris has some interesting posts about Yeti.
- boot-yeti, a Boot build task for Yeti development.
Yeti was created to have a clean and minimal expressive language on the JVM that allows functional style programming, has static type inference and interfaces well with Java code.
- Type inference using the Hindley-Milner algorithm. The types are statically inferred at compile time without a need for explicit type declarations.
- Polymorphic structure and variant types. Using those resembles duck typing from the dynamic languages - for example, when a value is used as a structure having a field foo, which gives string value, then any structure with string field foo will be good enough.
- Property fields in structures (access goes through function calls).
- Lazy lists
- Pattern matching on values
- Comfortable string regex support
- Easy to call existing Java code
- Interactive REPL environment for experimenting
- Compiles directly to Java bytecode
- Fast compilation and quite fast execution
Using Yeti feels like scripting language due row types, and the error messages are usually easy to read (which wasn't trivial to achieve in the compiler). Compiling to JVM bytecode made implementation much easier (JVM has very good JIT), but unfortunately has tied it to the JVM. The JVM is a big and often unwanted dependency, doesn't start very fast, and is today mostly used in environments, where Java is mandated. This leaves little room to non-Java JVM languages outside Android. Therefore the current implementation is for me an experiment that has successfully reached some goals, but a dead end otherwise. As it is occasionally useful tool, a maintanance (mostly bugfixes) will continue, but active development is not planned. It is also open source and anyone is free to fork it.
Given this, OCaml and Nim are better options, if you are seeking a productive and easy to use modern language outwith JVM. Those planning to create a new programming language might find some ideas from Yeti (read reference manual for type system details). It is also useful for having REPL and testing things on Java platform.
Editor syntax highlighting
- Vim syntax hilighting and filetype plugin.
Save these files as
~/.vim/ftplugin/yeti.vimaccordingly, and add
au BufNewFile,BufRead *.yeti setlocal filetype=yeti ts=8 sw=4 sts=4 expandtab
- Netbeans and Notepad++ support.
- Emacs mode for Yeti.
- jEdit mode for Yeti.
(put yeti into subject)