Some update in the v0.2 spec.
This commit is contained in:
parent
96c68b0d27
commit
7aa60fe930
1 changed files with 11 additions and 4 deletions
15
spec/v0.2.md
15
spec/v0.2.md
|
|
@ -28,7 +28,7 @@ Fun is **case-sensitive**. `Hacker` and `hacker` are different identifiers.
|
||||||
|
|
||||||
Reserved words cannot be redefined:
|
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
|
### Comments
|
||||||
|
|
||||||
|
|
@ -146,7 +146,7 @@ private number count = 42
|
||||||
number nothing = 23
|
number nothing = 23
|
||||||
```
|
```
|
||||||
|
|
||||||
- Dynamic variables
|
### Dynamic variables
|
||||||
|
|
||||||
```fun
|
```fun
|
||||||
dynamic string x = 42
|
dynamic string x = 42
|
||||||
|
|
@ -271,9 +271,16 @@ The next step... ;)
|
||||||
|
|
||||||
## 10. Reflections
|
## 10. Reflections
|
||||||
|
|
||||||
|
Return "number", "string", etc.
|
||||||
|
|
||||||
```fun
|
```fun
|
||||||
typeof(x) // Returns "number", "string", etc.
|
string the_type_is = typeof(x)
|
||||||
methods(obj) // Lists callable methods
|
```
|
||||||
|
|
||||||
|
List callable methods
|
||||||
|
|
||||||
|
```fun
|
||||||
|
array these_are_callable = methods(object)
|
||||||
```
|
```
|
||||||
|
|
||||||
## 11. Internal functions
|
## 11. Internal functions
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue