creationix / jack

Another new language. The name will probably change.
109 stars 7 forks source link

Use function statements instead of function expressions. #4

Open creationix opened 10 years ago

creationix commented 10 years ago

This will need a modification to the syntax.

Before, you created a function with:

vars add
add = { a, b | a + b }

After you do it with this maybe?

def add(a, b) { a + b }

This statement is not an expression. It's defined for the entire body of the scope as if it's hoisted to the first line.