1
0
Fork 0
forked from fun/fun

Some update in the v0.2 spec.

This commit is contained in:
Johannes Findeisen 2025-09-12 04:59:44 +02:00
commit 7aa60fe930

View file

@ -28,7 +28,7 @@ Fun is **case-sensitive**. `Hacker` and `hacker` are different identifiers.
Reserved words cannot be redefined:
`if`, `else`, `for`, `while`, `fi`, `fun`, `global`, `private`, `return`, `true`, `false`.
`if`, `else`, `for`, `while`, `fun`, `global`, `private`, `return`, `true`, `false`.
### Comments
@ -146,7 +146,7 @@ private number count = 42
number nothing = 23
```
- Dynamic variables
### Dynamic variables
```fun
dynamic string x = 42
@ -271,9 +271,16 @@ The next step... ;)
## 10. Reflections
Return "number", "string", etc.
```fun
typeof(x) // Returns "number", "string", etc.
methods(obj) // Lists callable methods
string the_type_is = typeof(x)
```
List callable methods
```fun
array these_are_callable = methods(object)
```
## 11. Internal functions