Alana v2.0

Alana — Code what you mean.

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 define line. Function return types may introduce themselves with returning. They do not have to.
  • is assigns. sameas compares. Mixing them up is a rite of passage.
  • Multiply, divide, and modulo are times, divide, and mod. Symbols felt too aggressive.
  • new leaves a chair empty. newobj builds an object from a class.
  • import invites another file. including opens a runtime library.

Where to go next