What and _why?

KonaScript (or Kona) is small, fast language meant to replace JavaScript on the web.

I started work on this language a few weeks ago on a whim because I had this really strong feeling that I wanted CoffeeScript to have a come back but I just didn't like the syntax. A silly thing to think, I know. Well, to change that I would need to learn how an interpreter works, so I started learning how interpreters work. One thing, led to another, and now I'm full swing in developing a new language for the web. KonaScript!!!

Kona takes inspiration from Ruby, JavaScript, CoffeeScript, C, Swift, HTML, CSS, Lua, GUM Magazine, the Teenage Engineering OP-1, and Bomb Rush Cyber Funk. Kona is iteratively typed, You can "type hint" function parameters and the language will check the types of only the parameters that are hinted. Kona is object oriented, every value either is an object, or has an associated behavior table so that you can interact with it like it's in a object. Functions are first class citizens in Kona, but because of the object oriented nature of the language, getting a reference to a function value means grabbing it's handle.

Kona is meant for the web HTML, CSS, and JSON are first class citizens. Special literals are made for each, so that you can interleave Kona along with your HTML, CSS, and JSON. Kona offers a simplified templating language similar to mustache.

Kona is written in C and Lua, running on a LuaJIT core, in a modified Lua environment. Kona is compiled to Lua, then transformed into Lua bytecode. This makes Kona very fast, easy to modify, and easy to develop, while still being very small.

The design goals of Kona are to replace JavaScript on the web; To provide a stable and long lived VM target, and to make difficult much of the issues we face when using JavaScript and the Javascript ecosystem, namely weak type checking, convoluted namespacing, dependency hell, etc....

Kona offers simple and extensible meta programming features, Like Ruby.

Kona is built with event based reactivity in mind. With Bindings and Events You can observe the change of any object or value in any other object or value. Kona's builder pattern provides a natural way to associate Parent > Child relationships, as well as Sibling relationships.

But all of this is still yet a dream. Kona is under active development.


Kona or KonaScript is © 2023 Karl Oscar Weber

LuaJIT is Copyright © 2005-2023 Mike Pall. luajit.org

Lua is Copyright © 1994-2023 , PUC-Rio. Lua.org