A design that subsumes the various syntactic forms of
if
statements/expressionsswitch
on valuesmatch
on patterns and pattern guardsif
-let
constructs
and scales from simple one-liners to complex pattern matches.
You must log in or register to comment.
A quite decent syntax and an excellent domain name!
How does $person get set?
Good catch, that should have been
if person
in the first line.It’s been a left-over from when syntax looked like this:
is Person("Alice", _)$person then "{$person.age}" is Person("Bob", $age) then "$age"
This looks very similar to The Ultimate Conditional Syntax, although that’s for ML so it doesn’t have the nice syntax for chaining method calls.
The author of that paper hung around in the lang design forum were I originally presented this.