Tim Jansen's blog


2005/01/26
Eek - 10 months later
I started writing the Eek specification 10 months ago and my last summary was written in April '04, so I thought it would be nice to bring it up to date. The Eek specification is not done yet (5 pages left), but I don't expect any major changes. Eek is 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 static/class members, every member has an object
  • support for singletons (as static replacement)
  • 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
  • methods and properties can have Eiffel-like constraints
  • built-in support for a XML-compatible data model called EXML, including literals for nodes and qualified names
  • additional operators to allow EXML processing like the upcoming ECMAScript4XML (E4X) standard
  • more logical control structures: any block can be prefixed by 'if', 'do', 'while' and 'for', 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
  • factory constructors that look like a regular constructor but act like a factory method
  • virtual constructors that can be overridden
  • support for tuples as return types and in assignments
  • Developer has a choice between checked exceptions, like Java's, and unchecked like C#
  • buzzwords: operator overloading, multi-methods, varargs, delegates, generics, exceptions, enum, foreach (but no C for), co-routines (with yield), closures, events
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
Extendability Designed to make it easy to extend the language with new features. Possible extensions include a sister language that feels like a dynamic scripting language, based on the 'any' type.


 

This blog is my dumping ground for thoughts and ideas about Eek. Someday Eek will be a programming language and system, somewhat comparable to Java in scope. It is my attempt to bring sanity to the world of computing.
At least I hope so. Right now it is far from being finished and I can't guarantee that it ever will be. I am still working on the specification, but I won't release anything before I got my first prototype running. The world does not need more vapourware and unusable beta-software. All publicly available information about Eek is contained in this blog. You can find the latest summary here.
This page is powered by Blogger. Isn't yours? Creative Commons License
This work is licensed under a Creative Commons License.