Articles

Mixfix Function Syntax for Whiley

Today I saw an interesting talk about mix-fix function syntax.  The idea is to allow a more complex syntax for declaring and calling functions, rather than the very common “uniform” style. Consider the call, f(x,y), to a single function (e.g. declared f(int,int)) accepting two parameters. With mixfix functions, we can break our function names . . . → Read More: Mixfix Function Syntax for Whiley

Whiley v0.3.33 Released!

The next release of Whiley is upon us!! Work got a little bogged down with the start of term, but should hopefully now pick up a little.  The main component of this release is the removal of the string and char data types from the language. This is quite a big change, but is . . . → Read More: Whiley v0.3.33 Released!

Looking Forward to 2015

It’s scary to think that 2014 has been and gone, and that I still haven’t released the next major version of Whiley!  Despite this, I have been busy improving the compiler and language and I thought it would be helpful for me to recap what was achieved last year, and what the goals going . . . → Read More: Looking Forward to 2015

A Story of Cast Expressions

Issue #427 “Bug with Dereferencing Array Types” seemed like just another bug.  Submitted by a user last week (@Matt–), I didn’t think too much of it.  But, as sometimes happens, appearances can be deceiving.  In this case, the bug identified a flaw in the syntax of Whiley with respect to the treatment of cast . . . → Read More: A Story of Cast Expressions

Introducing the Whiley Cheat Sheet!

Recently, I created a Whiley Cheat Sheet for use in our SWEN224 course and I thought it was useful enough to share! The goal of the cheat sheet is to provide some simple examples to help you get going, rather than provide a comprehensive reference. I tried to cram as much as I could . . . → Read More: Introducing the Whiley Cheat Sheet!

Loop Invariants and Do/While Statements

Recently, I encountered what I thought was a bug in the Whiley Compiler. The issue related to the current treatment of do/while loops and loop invariants. Having now spent a fair bit of time researching the issue, the answer is not so clear.

The problem manifested itself when I tried to verify the following . . . → Read More: Loop Invariants and Do/While Statements

Thoughts on Parsing Whiley (and Indentation Syntax)

Recently, I have been reworking the Whiley compiler’s parser to make it more robust.  Doing this has opened up some interesting issues, which I thought were worth discussing.  Whiley uses indentation syntax without explicit end-of-statement terminators (e.g. semi-colons) and these things cause some interesting challenges.

Here’s a simple Whiley function to illustrate:

// Return . . . → Read More: Thoughts on Parsing Whiley (and Indentation Syntax)

Proposed Syntax Changes for Whiley

Now that I’ve had the chance to write a reasonable amount of code in Whiley, it is time to reflect on some things I don’t like.  In particular, there are a number of issues with the syntax which I’d like to improve which I’ll document here.

Function & Method Declarations

Currently, the syntax for . . . → Read More: Proposed Syntax Changes for Whiley

Flow Typing for References in Whiley

The Whiley language splits into a fully functional “core” and an imperative “outer layer”.  References and objects do not exist within the functional core.  However, they can exist within the imperative outer layer and are necessary for supporting state and other side-effecting computation.  Here’s a simple example:

define Buffer as ref { [int] items . . . → Read More: Flow Typing for References in Whiley

Three Rules for Programming Language Syntax?

I’m always pondering the question: what makes good programming language syntax? One thing occuring to me is that many languages often ignore the [[Human-computer interaction|HCI]] aspect.  For me, it’s a given that the purpose of a programming language is to simplify the programmer’s life, not the other way around.

So, I thought of a . . . → Read More: Three Rules for Programming Language Syntax?