Articles

  • No categories

FAQ

This page lists the frequently asked questions.

General

  1. Why is Whiley called Whiley? This is a question I get asked a lot!  In academic papers/books on programming languages, you’ll often encounter something called the “While” language (see e.g. here).  At first, Whiley was just a simple “While” language like this, but then it become much more complex. So, the name Whiley is a play-on-words, mixing “While” and “wily”, to get something which reflects its origins.
  2. Why does Whiley use indentation syntax like Python, rather than Curly braces like Java? Well, this is an interesting, and perhaps controversial choice.  The issue of indentation in Python is really divisive — people either love it or hate it (e.g. [1][2][3][4]).  The bottom-line is that I really like Python’s indentation syntax, and think it a useful innovation in programming language design.  However, there is another reason for using it: because otherwise we’d have too many braces.  The thing is, set and list comprehensions are very important in Whiley.  Since the two behave differently from each other, they need separate syntax. The usual (mathematical) syntax for set comprehensions is “{ .. | … }”, whilst for list comprehensions it’s “[ … | … ]”. Whiley follows this, but without indentation syntax there would be too many curly braces making things rather confusing!