Alana v2.0
A programming language trying very hard to be elegant. The source reads like English. The bugs, unfortunately, still read like bugs.
This is the full map of v2.0 — every keyword, type, loop, class, library, and example — tucked into the little menus on the left. Nothing here is hidden. Hiding the bugs would be rude.
What she can do today
- Variables, arithmetic, and typed values — including
any, when you refuse to commit - Functions, parameters, returns, local scopes, recursion
- Comparisons and boolean logic, said out loud — plus
isa - If / elseif / else, because life is rarely binary
- Arrays
- while, for, and forevery loops
- import, public, private, and including
- classes, fields, methods, self, and object references
- inheritance, override, abstract, parent, and runtime polymorphism
- try / catch / finally / throw
- a standard library: HTTP, JSON, and errors
Making you a sandwich is still not a feature. I already said I would not add this feature.
How a program looks
Cute, on purpose. Every statement ends with ;. Yes, like everyone else. The # years were a phase.
define num x is 10; define num y is 3; define func sub(num x, num y) returning num; return x - y; end; define func add(num x, num y); return x + y; end; define num z is call sub(x, y); showln z; define num k is call add(x, y); showln k;
The house rules
- Every statement ends with
;. Think of it as a polite full stop. - Types live on the
defineline. Function return types may introduce themselves withreturning. They do not have to. isassigns.sameascompares. Mixing them up is a rite of passage.- Multiply, divide, and modulo are
times,divide, andmod. Symbols felt too aggressive. newleaves a chair empty.newobjbuilds an object from a class.importinvites another file.includingopens a runtime library.
Where to go next
Install & run
A few steps, then you start coding cute.
Types
num, decimal, str, schar, boolean, any, arrays.
Inheritance
extends, parent, override, abstract. A family tree.
Standard library
HTTP, JSON, errors. The start of a kitchen.
Examples
From a shy one-liner to the kitchen sink.
try / catch
Things explode. Now they explode into catch.