Still working to recover. Please don't edit quite yet.

Kogut

From Anarchopedia
Jump to: navigation, search
Kogut programming language
Developer: Marcin 'Qrczak' Kowalczyk
Latest Release: 0.6.0 / October 2005
Release date: November 2003
Platform: Posix
Genre: Programming languages
License: GPL

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.

Hello World[edit]

WriteLine "Hello, world!"

Examples[edit]

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[edit]

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.

History[edit]

Kogut's first incarnation, an interpreter in Haskell, was written in August 2001. It was much different from Kogut though. The second incarnation, a compiler in Haskell which generates OCaml code, was written in November 2001. On January 12, 2004 Kokogut started producing executable programs. Since May 26, 2004 Kokogut is hosted on SourceForge.

External links[edit]

This article contains content from Wikipedia. Current versions of the GNU FDL article Kogut on WP may contain information useful to the improvement of this article WP