Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 73a8a0f5f5
Fetching contributors…

Cannot retrieve contributors at this time

76 lines (52 sloc) 2.252 kB
# TODO
(next up:)
! Need higher-level tests, where we take a Delta expression (or a
series of expressions) and check them against an expected result.
--- NOTES
- All built-in methods must have the following signature:
(obj args ns interp)
where obj is the object the method is called on,
args is a list of arguments passed to the method,
ns is the namespace it is called in,
and interp is the interpreter object being used.
--- CODE ORGANIZATION
- Sigh, since many objects are mutually recursive, we run into module
problems. The best way is probably to just abandon them altogether
and use a massive "load" wherever necessary. =/
In this case, builtin/integer.scm uses interpreter.scm; in fact, all
builtin proto modules do, because they need to look up protos and to
do that they need to inspect the interpreter object/record. But,
interpreter.scm needs to build a list of protos, so it imports
builtin/integer.scm and friends. Much hilarity ensues. :(
It's also completely unnecessary, because at load/import time, none
of the modules use code that uses the other; this is deferred until
runtime.
--- PARSER
- Empty statements should be allowed (i.e., a single dot).
--- TESTS
- We need a way to run all tests (and show results properly). See the
Gauche manual.
--- OBJECTS
- The following idiom seems common:
(let ((bns (interpreter-builtin-ns interp))
(int-proto (namespace-get bns "Integer"))
(obj (clone-object int-proto :data n)))
We should probably add a helper function FIND-PROTO or something.
The builtin protos have their own namespace, so they should be easy to find.
- Symbols should be cached. Much like in Scheme, two different
mentions of a symbol #foo should refer to the same object (and have
the same id). Maybe this cache should be in the interpreter object.
[NOTE: Not really high priority for Delta/B...]
--- AUXILIARY
- Need helper procedures that check the (Delta) type or type tag of
objects. Useful for argument checking.
--- NEXT UP
- Some obvious things we're going to need before the REPL is even
remotely useful:
- slot access
- lists
- name lookup / access
- cloning / init
- booleans
- Namespace proto
- Map proto?
Jump to Line
Something went wrong with that request. Please try again.