Inside SWT

Tuesday, April 17, 2007

Announcing Avaj!

Avaj is a new strongly typed object oriented language. It features C syntax, a garbage collector and many other advanced features. The designers of Avaj know that "API is forever" and "@deprecated is a lie". Therefore, Avaj has a compact class library, starts fast and has a small memory footprint.

Classes in Avaj are real. The concepts of "class" and "type" are the same. Each class has a meta-class to describe the class and support inheritance on the class side. Types that are built-in, such as "int" or "float" and concepts like arrays, are modeled by Avaj classes (although highly optimized at runtime).

The designers of Avaj built on their experiences with other computer languages. For example, dynamic languages like Lisp and Smalltalk have closures, making concepts like iterators and inner-classes obsolete. These constructs and other redundancies were not added to the language.

Unfortunately, all work stopped on Avaj when it was determined that no one could make any money off it.


Thursday, April 05, 2007

No code nirvana

The other day, I was reviewing our coop's code (a coop is an intern for those of you from the states). We get great coops who are smart and work hard and this guy is no exception. I always ask the person to clean up their code before I get there and make sure it's good.

It is normal for me during the review process, even after cleaning, to delete 10 to 50% of the code, without removing any functionality. Some of it is unused variables, dupicate state, things that are stored instead of computed and all the usual things that cause "too much code". However, a surprising amount of it is simply duplicated or unnecessary work. Why?

SWT committers are rewarded for implementing functionality, not writing code. We take pride in having the minimum amount necessary to do the job and strive to reach "no code nirvana" (an impossible state). Perhaps you reach it when you become a manager?