Wednesday, August 22, 2007

New Verdantium Version -- 0822

This version is closer to Sun's standard naming conventions for the Java programming language, e.g. constants in all-caps. A lot of the changes are focused on the Meta project. There's a reason why Meta hasn't followed typical Java conventions: Meta is older than the Java language. It originally existed in C++, and was ported to Java circa JDK 1.0. It has undergone several changes since then. Parts the original Meta were dropped because they were obviated by the Java instanceof operator, other parts were later dropped because they were obviated by Java Collections Framework (JCF), classes were later added to handle XML encoding/decoding, etc. I've also added more Java exception support.

Several parts of the original Meta still haven't been obviated by the Java language. For instance, the FlexString class is still very useful. FlexString was originally a response to severe performance issues encountered with strings in C and C++. Adding a character to the start of a large C or C++ string requires pushing the entire existing contents of the string one character to the right. With Java, string performance is even worse. Adding a character to any part of a Java string causes a completely new string to be allocated, which copies the entire original string. FlexString is modeled after the standard pattern in simple text editors-- multiple text buffers with a mid-section gap between them. Changing the gap position allows characters to be efficiently inserted into any position of a large string. I find it amazing that a mainstream programming language hasn't added something like this to its standard libraries.

I think Meta is approaching a mature state. It will probably change in the future to accomodate generics, but I don't see any other major changes coming.

The new Meta caused basically everything to change: JUndo, JUndo Runtime, Umeta, and Verdantium. One needs the latest of everything to build.

There's more for me to do, but I wanted to get the changes to Meta done before the baseline grows too large. More on this later. I'm tired.

No comments: