Eek
Eek
I wasn't going to write much about Eek because I didnt want to pollute the world with even more vapourware. But I couldn't resist to talk about what I am working on in the Programming Language Design forum on
Orkut, so I will repost it here:
It's a strongly-typed, imperative OO-language with many similarities to Java, but enough details to make creating a new language worthwhile:
Semantics
- everything is really an object, even numbers
- there are no packages/namespaces, only classes that can be nested
- there are two kinds of references: those that allow null and those that forbid it
- there is no separation between properties and fields like in C# or Java, both are the same
- method arguments and properties can have constraints
- literals for XML nodes
- additional operators to allow XML processing like the upcoming ECMAScript4XML standard
- more logical control structures: any block can be prefixed by 'if', 'do', 'while', 'for' and 'using' and postfixed by 'else', 'until', 'catch' and 'finally'. You can combine a postfix and a prefix
- String characters are int
- no number types <32 bits, no unsigned numbers
- no (native) arrays
- a 'any' type that is a Object reference, but every method invocation or property access is checked at runtime. It thus behaves like a reference in a weakly typed language
- 'static' constructors that look like a regular constructor but act like a (factory) method
- support for tuples as return types and in assignments
- buzzwords: operator overloading, multi-methods, varargs, delegates, generics, exceptions, enum, foreach (but no C for), co-routines (with yield), limited closure support (only one expression)
Syntax
- Java-like operators and keywords
- Python-like indentation for blocks (but without the colon) and statement-separation rules (no semicolons)
- no 'new' keyword, instantiation looks like C++ auto-allocation
- no parenthesis for control statements
Scripting
A sister language that feels like a dynamic scripting language.
- adds implicit variable declaration (with the 'any' type)
- removes some restrictions
written at 12:34. (0 Comments, Permalink)