Tell all the Truth but tell it slant
Success in Circuit lies
Too bright for our infirm Delight
The Truth's superb surprise
function cube(x) x * x * x
use unit acme.widgets "http://acme.com/widgets";
unit acme.widget { // program unit definition goes here ... }
class Dict.<K, V>
with key, value type params
k1.equals(k2), k.hashcode()
k1 === k2, intrinsic::hashcode(k)
Object
to Dict.<K, *> for several key types K
let d : Dict.<string, int> = {a: 1, b: 2, c: 3};
- Sensible JSON integration via
toJSONString
- Name still in flux (
Hash
? Dictionary
? HashMap
? Ugh)
ByteArray
class, converts from Array
Array.map
etc. work on it, albeit generically
Vector.<T>
Vector.<T>(length : uint = 0, fixed : boolean = false)
ByteArray
could be subsumed by Vector.<byte>
byte
type
type A = [int, string, boolean]
is a tuple
Tuple
type!
Array
function f(a : {p: int, q: string}) ...
f({p: 42, q: "hi"})
check, and when?
isArrayLike
, isDateLike
C
with the right instance vars,
f(new C(42, "hi"))
can go fast
<script> type=
values:
application/ecmascript;version=4
application/javascript;version=2