Comparison with Javascript¶
Feature | Boo | Javascript |
---|---|---|
First-class functions | yes | yes |
Function expressions | yes | yes |
Closures | yes | yes |
Scope | Lexical (Function, Type) | Lexical (Function) |
Name resolution | Static and Dynamic | Dynamic |
Type system | Static and Dynamic (Strong) | Dynamic (Weak) |
Variadic functions | yes | yes (via arguments) |
Inheritance | Class/Type based | Prototypal |
Generators | yes | yes (Harmony) |
List comprehensions | yes | yes (Harmony) |
Iterators | yes | yes (Harmony) |
Properties | yes | yes (Harmony) |
Destructuring | yes | yes (Harmony) |
Method overloading | yes | no |
Operator overloading | yes | no |
Macros | yes | no |
Pattern Matching | yes | no (only limited switch) |