aboutsummaryrefslogtreecommitdiffhomepage
path: root/notes/slul_vs_lrl5.txt
blob: ffd6c12905068296c5719e8cc29844a3cefbf1e3 (plain)
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

Changes from LRL5:

New name:
- SLUL? Secure Lightweight Usable Language

High level implementation changes:
* Not all language constructs may be possible to compile to C, so it is
  probaly better to translate directly to machine code. It does not have
  to be an efficient translation (but easy optimizations could be done).
* Perhaps it should support all checks for invalid code? The compiler
  needs to know about types anyway (for typescopes, but also so codegen).
* Require forward declarations?
  - This is (almost) required for interactive "REPL" modes.
  - Require only that everything is delcared before the first function body?
  - And require function bodies to come after declarations?

Low level implementation changes:
* Don't parse files using fgetc, use a buffer instead
   - fgetc is thread safe, and could be slow
   - Parsing char-by-char prevents usage of str... functions
     which are optimized
* Should we:
   - keep the source in memory?
   - keep identifiers as is in memory, unescape strings in place, and have
     a free-list for the remaining "holes" that can be used for subsequent
     allocations?
   - not keep the source in memory and keep track of line/column numbers?
* Should we store exprs as RPN?

Design changes:
* Focus more on usability?
* Support both machine code and "VM" targets? E.g. JVM and CLR.