Whiley Talk at Wellington JUG (VIDEO)

Last month, the Wellington Java User Group was kind enough to invite me to give a talk on Whiley.  The talk is a general introduction to Whiley, including the syntax, some issues related to implementation and inter-operation with Java.  The talk was video and, finally, after some faffing around I’ve uploaded it onto YouTube . . . → Read More: Whiley Talk at Wellington JUG (VIDEO)

Fall-Through by Default for Switch Statements?

The switch statement has a long history, and most languages support it or something similar.  In my experience, I found it to be very useful — both for conciseness, and also improving performance.  With the recent release of Java 7, you can finally switch over strings.

In Whiley, the syntax for switch statements currently . . . → Read More: Fall-Through by Default for Switch Statements?

Namespaces in Whiley

With the upcoming v0.3.10 release of Whiley, the way import statements are interpreted has changed in a fairly significant manner.  The primary purpose of this is to give better support for [[Namespace (computer science)|namespaces]]. The following illustrates what’s changed:

import whiley.lang.Math bool check(int x, int y): return max(x,y) == x

Previously, the above code . . . → Read More: Namespaces in Whiley

A Subtyping Gotcha

An interesting issue with the following piece of code has recently come to my attention:

define Queue as process { [int] items } int Queue::get(): item = this.items[0] this.items = this.items[1..] return item void Queue::put(int item): this.items = this.items + [item] Queue ::Queue(): // following line should be invalid return spawn { items: [] . . . → Read More: A Subtyping Gotcha

Whiley v0.3.9 Released!

So, it’s that time again for another update of the Whiley compiler. Perhaps the most interesting update is that constraints are back! Admitedly, only runtime checking of constraints is back; and, there are quite a few problems with it. But, it’s a step in the right direction, and I’m pretty excited about it.

I’ve . . . → Read More: Whiley v0.3.9 Released!

The State of Whiley

The aim of this post is simply to list the main outstanding issues with the design and implementation of Whiley.  This is primarily for my own purposes, in order to help me focus my efforts and to ensure I don’t forget something important.


Deciding upon the language syntax is obviously the highest priority . . . → Read More: The State of Whiley

Implicit Coercions in Whiley

The issue of [[Type conversion|implicit coercions]] in Whiley is proving to be a particularly thorny issue.  The following motivates why (I think) coercions make sense:

real f(int x, real y): return x + y real g(int x, int y): return f(x,y)

I believe the above should compile without error.  However, this requires an implicit . . . → Read More: Implicit Coercions in Whiley

Whiley v0.3.7 Released!

Development has continued at a fairly quick pace since the last release of Whiley.  However, with the impending start of term, things are bound to slow down.  Therefore, I’m making a release now a little sooner that otherwise planned.  This fixes a number of important bugs, finally allowing the compiler to compile my benchmark . . . → Read More: Whiley v0.3.7 Released!

Bits, Bytes and More Ambiguous Syntax

Recently, I added a first-class byte type to Whiley.  Unlike Java, this is not interpreted as some kind of signed or unsigned int. That’s because I find that very confusing since a byte is really just a sequence of bits without any interpretation.

Therefore, in Whiley, a byte is just that: a bit . . . → Read More: Bits, Bytes and More Ambiguous Syntax

Disambiguating Ambiguous Syntax?

When designing a programming language, being on the lookout for ambiguous syntax is important. You don’t want to realise down the track that your syntax is ambiguous in some subtle way. This is especially true if it means the compiler can’t decide how to proceed on some important case(s).  But, spotting these problems is . . . → Read More: Disambiguating Ambiguous Syntax?