Skip to content

Instantly share code, notes, and snippets.

@Whiteknight
Created February 5, 2012 00:12
Show Gist options
  • Save Whiteknight/1741304 to your computer and use it in GitHub Desktop.
Save Whiteknight/1741304 to your computer and use it in GitHub Desktop.
Winxed syntax ideas for NotFound
Some ideas for new winxed syntax:
anonymous function foo(...){...} instead of
function foo(var x named 'bar')
same as:
function foo(var x [named("bar")])
foo(x named 'bar')
same as:
foo(x:[named("bar")])
foo(x flat array)
foo(x flat hash)
same as:
foo(x:[flat])
foo(x:[flat,named])
function foo(params var x)
function foo(params var x named)
same as:
function foo(x [slurpy])
function foo(x [slurpy,named])
function foo(var x = "default")
any expression can appear there. same as:
function foo(var x [optional], int has_x [opt_flag]) { if (!has_x) x = "default; ... }
:(params var x) = foo(...);
:(params var x named) = foo(...);
same as:
:(var x [slurpy]) = foo(...);
:(var x [slurpy,named]) = foo(...);
static function foo(...) {...}
same as:
function foo[nsentry](...) { ... }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment