-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
57 lines (49 loc) · 1.85 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Goals:
- Uniformity:
- Everything is an object
- The program itself is an object (homoiconity)
- All objects are expressions (thus everything is an expression)
- Value objects are expressions that return themselves
- Expression objects are expressions which evaluate to something other
than themselves
- All objects are dictionaries (thus everything is a dictionary)
- Dictionary keys are objects (not strings)
- All objects are mailboxes (thus everything is an actor)
- Objects can receive messages
- Programs can send messages to objects
- Minimalism:
- Minimal syntax, enough syntax to be expressive
- No keywords
- Infix, not prefix (lisp) or postfix (forth)
- All infix expressions are evaluatable objects
- Tree-structure inherit in syntax
- Minimal builtin data types
- so far: string, integer, float, object (table)
- Ease:
- Readability - infix in spite of added parsing complexity
- But the infix notation is just syntactic sugar, not an additional
language element
- Should be simple to expose a C function or C++ class to the VM
Basic syntax:
- all operators all just messages delivered to the receiving object
- valid operators:
- any valid infix operator
- pairing operators: ':', ',', ';', '\n'
- misc operators: [], []=,
- code block operator: { }
- operations on local variables send messages to the current context
- identifier
- identifier = value
- message syntax:
- obj msg
- obj msg { block }
Open questions:
- What kinds of messages are there? So far:
- Function call - context push
- Fiber - context switch
- Why separate mechanisms for attributes (table) and messages?
- Nonuniformities:
- How can we turn lvar/lasgn into messages?
- How can we turn { } into a message?
- Once all expression nodes have been reduced to messages, where do we
go from there?