Like every other programmer with a pulse, I am compelled to create my own programming language. My compulsion is fueled by my day job, where I must deal with million line C++ programs. Jolt is the language in which I wish I could be programming.
Jolt is a systems programming language intended to be used anywhere one would use C++. It is as willing to get dirty in the name of performance. It is not willing to compromise in the name of compatibility with legacy languages. It is a language in which everything is an object, inheriting from Object, including the “primitive” types, and yet is capable of implementing many of these same types in itself. It includes features traditionally seen in dynamically-typed object-oriented languages such as Ruby, and even has some LISP features, yet does so in a way that preserves strong static typing and the performance benefits thereof.
At the very least, the people who gripe that every new language looks like C++ or Java but with really neat feature X or minus really evil feature Y and why can’t someone come up with something not so derivative… whatever faults they may find with Jolt that won’t be one of them.
While the language specification is meant to be an introduction and reference, it suffers from the “stream-of-consciousness brain dump” syndrome. I’ll need to do an overhaul someday, but at over a hundred pages (when formatted for printing) and growing, right now that would take too much time away from implementing the compiler.
Comments may be mailed to me at jeffc at this domain (I’m reluctant to provide a direct link in order to keep spam under control).
Links
Recent News
Jan 24Not much activity for the past half-year. Still updating the compiler for the changes detailed below. Visual Studio 2005 is now required for Windows builds; 2003 is no longer supported.
Jul 5The language specification has finished undergoing substantial changes. This has turned out to be the biggest update in a very long time. It’s now the compiler’s turn.
May 31The language specification is about to undergo substantial changes. I’m backing off from the everything-is-an-object approach. While it works great in dynamically typed languages, Jolt is statically typed and there isn’t really anything that can be done with a reference to an Object that isn’t better served by algebraic unions or genericity. Java and C# try to have everything be an Object, to the point of boxing ints, and they are statically typed, but that is because without genericity there is no other way to have collections. Now that they have genericity, boxing is a legacy that is far less useful.
But at least Java and C# have managed memory, like any dynamically typed language. Jolt had to make it work with unmanaged memory, without the benefit of boxing. While I think I succeeded, it created a whole bunch of chicken-and-egg implementation issues. None appear to be showstoppers, but it has begun to feel like making it work is an exercise in cleverness for the sake of cleverness, which is ironic as one of my original justifications would be that it would make it easier to implement.&nbnsp; Anyway, it would be an exotic Jolt program that noticed the difference between ints being an Object and not being an Object. It also significantly increases the overhead of the compiler.
So Object goes away. As with C++, the class hierarchy is a forest and not a single tree. Class and Metaclass also go away, though every class still has a corresponding metaclass, which owns the static members of the class; metaclasses themselves no longer have a metaclass. No longer will every type—i.e. integers, pointers, C-style arrays—be a class, but it will still be possible, say, to create a class that is also an array type by declaring it to possess the array concept. Concepts define kinds of types, along with their subtyping relationships, and are the basis of constrained genericity and type pattern matching. The type system takes on a functional flavor, with classes being merely one of many kinds of types and not the dominant type. I may even squeeze in type classes one day.
These revisions will take a while to complete, and then comes the task of updating the compiler—but far better to do it now than after more of the language got implemented! Sections not yet updated are clearly marked.
May 17Removed LLVM target. It just isn’t worth it. LLVM requires too much of my attention to keep it working on Windows and FreeBSD/amd64 (especially the amd64 part), it’s another target I have to maintain and enhance to keep it in sync with the C++ target, ABI issues with Jolt being able to use libraries implemented in C++ is still and will remain a problem, and quite frankly I don’t care for some aspects of how LLVM is managed. This is the second time I dumped LLVM and twice is enough. There’s no value in using LLVM before the compiler is finished and achieves a measure of popularity. I’ll wisely refrain from speculating on when this might occur.