User loginNavigation |
Namespaces, scoping, etc.With assignment deadlines pending, I've had to find myself some little project with which to procrastinate. To this end I've dug out my recurring goal to write a simple theorem prover. Last night I wrote a bit of code to represent the expression ASTs of my language and some transformations on the same. Essentially I am representing ASTs as a binary tree (to be extended with other arities later) with labels on leaves and internal nodes:
The leaves of a I'm familiar with Haskell's treatment of type- and data-constructors as being in separate name-spaces, and seem to recall reading that name-spaces are first-class in Scheme. My questions are these: How advisable is it to separate the "name-spaces" of values and operators as I've done? If I'm to extend my system to support languages like the λ-calculus in the future, would it be better to use a single name-space now and require that the parser ensure that the user doesn't treat a value as an operator? By Thomas Sutton at 2006-05-29 03:38 | LtU Forum | previous forum topic | next forum topic | other blogs | 2911 reads
|
Browse archivesActive forum topics |