Another language I am thinking about.
- Like Python, variables aren't typed but values are.
- Simple syntax.
- No operators.
- Objects don't have methods. Methods are functions that know how to work with each object because that behavior is described by the object.
- Functions don't have to evaluate the args before doing their work. They can process the args before they are evaluated for some fancy-schmancy stuff.
- The actual language is quite small. All the neat stuff is added on top to make it more usable.
1.0 # Float 1.0 3 # Integer 3 "asdf" # String "asdf"
- variable lookup
- Calling functions/macros
foo(a b c) # Note: Not all functions evaluate each argument. These are called "macros".
- Variable assignment
set(a 5) # Note: 'a' is not evaluated, although it is inspected.
The top-level symbol is evaluated.
This means, "Lookup the value of the variable named 'foo'". The order of looking something up is:
- Built-in. If 'foo' is defined as a built-in, then call that.
- Lexical. If 'foo' was defined locally, use that. If it was defined in the context that this code block was defined, then use that.
- Dynamic. Look at the calling context for the dynamic variable of the same name.
foo(a b c)
This means, "call the value of foo with parameters 'a', 'b', and 'c'." Note that 'a', 'b', and 'c' are not necessarily evaluated as part of the call, merging the concepts of macros and functions together.
This means, "Evaluate 'a'. Lookup item 'a' in 'foo'."
This means, "Evaluate 'foo'. Lookup 'a' in the value."
The basic data types are:
- char (unicode char)