Kogut
|
Kogut is an impure functional, object-oriented programming language with very innovative syntax intented to remain simple, avoid verbosity, and yet introduce enough syntactic sugar to keep code short.
Kogut was conceived as a functional scripting language that was also capable of being used for larger projects. Although Kogut is object-oriented, it is not so in the traditional sense of message passing; rather, it is more like the way object orientation works in CLOS or Dylan. The separation between functions and methods is seamless, and methods can be scoped in modules completely separate from the datatypes.
Contents |
Hello World
WriteLine "Hello, world!"
Examples
The following function tail-recursively calculates the factorial of a number, using Kogut's loop
construct, which is similar to a named let in Scheme but claimed to be more flexible and easier to use:
let Factorial (x > 0) { loop x 1 [ 0 acc {acc} cur acc {again (cur-1) (acc*cur)} ] };
Implementations
Kogut was designed and implemented by Marcin 'Qrczak' Kowalczyk. The most current implementation is Kokogut, which compiles Kogut programs to C, allowing C snippets to be integrated seemlessly into Kogut code. Kokogut is hosted at Sourceforge and is licensed under the GNU GPL with a linking exception allowing applications compiled with Kokogut to not be distributed with the Kokogut sourcecode and not be under the GPL.
External links
- Kokogut website (http://kokogut.sourceforge.net/)