Array literals
Arrays are statically sized homogeneous data structures.
l = (,) l = (1, 2, 3) l = ("Eric", )
List literals
Lists are dynamically sized heterogeneous data structures.
Hash literals
Also known as associative arrays or dictionaries.
h = {} h = { "spam" : "eggs" }
print(h["spam"])
Timespan Literals
print(50s) print(1d) print(2m) print(42ms)
print("Tomorrow this time will be: ${date.Now + 1d}")
Regular Expressions
fname, lname = /(\w+)/.Matches(" Eric Idle ")
print(fname)
print(lname)
Extended regular expressions can also contain white space and tab characters but they must be started by the @/ sequence:
fname, lname = @/ /.Split("Eric Idle")
print(fname)
print(lname)