Plinth Status Update

This week, I thought I’d give an update on which parts of Plinth are finished and what still needs doing.

Last Tuesday, I finished implementing properties. They work as described in the last few blog posts, with a few extra considerations for initialising inherited properties. Since then, I have been fixing various small omissions and other problems, such as an edge case in inheritance checking, and making sure value-typed variables do not alias each other.

I have also added support for “super.foo” to access fields and methods on a super-class/interface. For methods, this results in a non-virtual method call.

There are several major things which still need implementing:

  • Generics
  • Enums
  • Default and Variadic Arguments
  • For-each loops
  • Closures
  • Access Specifiers (public, protected, package, and private)
  • Standard Library
  • Garbage Collector

The next thing I will be working on is Generics, which will support using any type as a type argument, including things like primitives and functions. Generic types will not be erased at run-time; instead, run-time-type-information pointers will be passed into functions and stored inside objects, so that the type can still be used at run-time.

After Generics, the biggest barriers to the language being useful are the standard library and the garbage collector. The standard library includes (at a minimum) various data structures and APIs for using files and network sockets, which should not be too difficult to implement. On the other hand, the garbage collector is a difficult problem to solve efficiently in theory, especially in concurrent scenarios, so I am expecting it to take quite a while.

While these features are being implemented, I am writing documentation for the language, including a language specification. It is very much a work-in-progress, but it is located here: http://bryants.eu/plinth/

If you want to try out the language, some of the commits over the last week have made it much easier. There’s now an ant build script which will compile the compiler, runtime, and standard library. There’s also a bash script which greatly simplifies running the compiler. Everything you need to know should be in the readme on GitHub, but if there’s anything else you’d like to know, please ask.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.