68 lines
2.0 KiB
Markdown
68 lines
2.0 KiB
Markdown
# kitten
|
||
|
||
**Source:** https://kittenlang.org
|
||
|
||
Kitten Programming Language
|
||
|
||
[Kitten](/)
|
||
|
||
* [Introduction](/intro/)
|
||
* [FAQ](/faq/)
|
||
* [Source](https://github.com/evincarofautumn/kitten/)
|
||
|
||
# Learn
|
||
|
||
* [FAQ](/faq/)
|
||
* [Introduction](/intro/)
|
||
* [Tutorial](/tutorial/)
|
||
* [Documentation](/documentation/)
|
||
|
||
# Contribute
|
||
|
||
* [Source](https://github.com/evincarofautumn/kitten)
|
||
* [Issues](https://github.com/evincarofautumn/kitten/issues)
|
||
* [IRC](irc://freenode.net/#concatenative)
|
||
|
||
# [The Kitten Programming Language](#the-kitten-programming-language)
|
||
|
||
**Kitten** is a statically typed, stack-based functional programming language designed to be simple and fast. It is a *concatenative* language, combining aspects of imperative and pure functional programming. There is [an introduction](/intro/) available and a [tutorial](/tutorial/) in progress.
|
||
|
||
## [Features](#features)
|
||
|
||
Concatenative Programming
|
||
: A compositional style of programming to make refactoring easier and improve code reuse.
|
||
|
||
Static Types
|
||
: Type inference based on Hindley–Milner to help improve correctness and performance.
|
||
|
||
Permissions
|
||
: A system of effect types to control where side-effects are allowed.
|
||
|
||
Deterministic Resource Management
|
||
: Automatic management of memory and resources with no garbage collector.
|
||
|
||
## [Examples](#examples)
|
||
|
||
### [Hello world](#hello-world)
|
||
|
||
```
|
||
"meow" say // Kittens don't speak English.
|
||
```
|
||
|
||
### [Hello user](#hello-user)
|
||
|
||
```
|
||
define greet (List<Char> -> +IO):
|
||
-> name;
|
||
["Hello, ", name, "!"] concat say
|
||
|
||
"What is your name? " ask
|
||
greet
|
||
```
|
||
|
||
### [Larger examples](#larger-examples)
|
||
|
||
* [99 Bottles of Beer](https://github.com/evincarofautumn/kitten/blob/129d4bc7e5658a03cc765358ba0a1aba2dbf1c73/examples/beer.ktn)
|
||
* [Tic Tac Toe](https://github.com/evincarofautumn/kitten/blob/129d4bc7e5658a03cc765358ba0a1aba2dbf1c73/examples/tictactoe.ktn)
|
||
|
||
The [source code](https://github.com/evincarofautumn/kitten) is hosted on GitHub, and you can join [#concatenative on Freenode](irc://freenode.net/#concatenative) to keep up with the latest developments. |