-
Notifications
You must be signed in to change notification settings - Fork 1
Objects
Frederik Tobner edited this page Dec 17, 2022
·
3 revisions
The following types are considered to be an object in cellox
- classes
- class instances
- functions
- a method that is bound to a class instance
- native functions
- strings
- upvalues
All these objects are considered to be first class in cellox, meaning they are real values that you can get a reference to. This means that you can for example get the reference to a function and assign it to a variable.
fun foo() {
return 5;
}
var fooref = foo;
printf(fooref());