Saturday, September 09, 2006

Introduction to Hyper

Before I can talk about my programming language Hyper in depth, I first need to provide a background for readers. I will do that here.

First, why would I try to create my own programming language? A couple of reasons: because I was looking for features not present in existing languages, because I wanted to 'fix' certain issues from other languages and last but not least for the fun of it.

As explained in the 'introduction' on my website (here) I started early in the year 2004 implementing a compiler for the language I wanted to create. Back then, I actually had not really thought out the language yet so I based it largely on C++ except for its C style syntax. I already had ideas for the basic types and some statements, but I didn't have a type system yet so I got stuck for a while. After some time I figured out to use semi-implicit pointers (not reference types as they are in Java). Since then I have made a lot of progress, and the basics for the language are there.

Why the name "Hyper"? Well, back in 2004 I was thinking for a cool name to give to the language and a fellow student proposed the name "Hyper". I was ok with it, so Hyper it was. So the name has no actual meaning or relation to the language specification. The only disadvantage I see is the resemblance of Hyper with the full name of HTML: HyperText Markup Language.

This writing is going to get rather long now so I'm going for a short list of language properties and features: The language is statically typed and object-oriented like Java. The type system uses semi-implicit pointers, which means that pointers are declared explicitly but are implicitly used in expressions (no reference/dereference operations). Types are written from left to right. Arrays are real distinct types (not simple pointers) that remember their length. All types implicitly inherit from the built-in 'object' type. Built-in primitive types are real objects; they are derived from 'object' and they (can) have member functions. The language is a compiled one, like C++. An important aim is to provide an easy way for programmers to create platform independent programs. My buzz-word for this is 'write-once-compile-anywhere'. The language will provide a large standard library that provides many common needed things, together with platform abstraction mechanisms. If it is possible I would like to also provide a GUI library in it. Graphical user interfaces are needed for most programs, so having this would be great.

I am currently writing a compiler for the language part I have already figured out. The compiler is written in C++ and currently only does checkings on its Hyper input file; it doesn't generate executables yet. The compiler comes with a simple tool to convert a Hyper source file into a HTML file with syntax highlighting. It is already open-source (GPL license) but it isn't available yet for the general public. I will wait a bit more to make it public; I use a limited testing audience for now to get the first feedback. The public release (still in alpha stage of course) will come later.

As I wrote in previous messages, you can always get more info about Hyper on my website. The website already provides a limited amount of documentation on the current state of the language. See you next time.

No comments: