A syntax for IRON (by alaric)
Back in 2004 I jotted some notes on requirements for IRON types.
Since then I've been drifting somewhat towards looser typing, in the Lisp model; having that as the underlying system provides for more expressive programming power, while optional type declarations as assertions, where required, can bring back the statically checkable safety and runtime efficiency of a strict type system.
But that's not what I'm posting about in the current insomniac haze - I've been thinking about written syntax.
IRON is a data model for values. Although I'm still deciding how the mutable data structures like queues fit into things (specifications of them are definitely needed for TUNGSTEN, but whether they count as part of IRON or not is something I'm still debating), I think I may have settled on a basic syntax for written values.
Now, the key requirement here is that IRON is, in the manner of S-expressions, usable to express just about anything - from source code to boring data. Creating a written data syntax that's pleasant enough to use day in and day out is quite a challenge. s-expressions come pretty close, but are deficient in a few areas. YAML is pretty good, but I wouldn't want to write source code in it.
The main thing I'm adding over s-expressions is Smalltalk-like syntax, which I will explain in detail below.
So, without further ado, here's a basic IRON syntax.
