资 源 简 介
Foom was designed with a few core ideas.
· It must have C-style syntax. For better or worse, many of today’s programming languages have derived or borrowed aspects of their syntax from C. Doing so decreases the learning curve allowing broader adoption of the language.
· Everything is an object. Most programming languages have a set of primitive data types such as strings, integers, floating point numbers, and Boolean values. In Foom, all of these, with the addition of functions and types, are classes. They all have properties that can be accessed and manipulated.
· All curly brackets ({ }) are anonymous functions. This is a departure from C-style syntax to some extent. C uses curly brackets to limit scope and define blocks of code. Foom follows this convention; however, code within bare curly brackets is not executed until it is called, as it is a function.
· Variables are lexically-scoped. The context of a variable can be