Croc
Croc copied to clipboard
Trailing function parameters
I'm going to be dropping the Haskell-style function calls, but it would be nice to be able to make "control structures" without having to put the close paren after the function. So maybe we can borrow a page from other languages and allow a trailing function literal to be passed as the last parameter to a function:
time.timex() \
{
}
would be identical to
time.timex(\
{
})
Parsing issues: probably have to restrict it to same line, since stuff like this would be ambiguous:
foo()
function bar() { } // func decl, or func literal passed to foo()?