Programming Language for Old Timers

by David A. Moon
February 2006 .. September 2008

Comments and criticisms to dave underscore moon atsign alum dot mit dot edu.

Previous page   Table of Contents   Next page

Change History

27-Sep-2008 Initial public version
28-Oct-2008 Define pseudo-constructor.
Improve Data Classes section slightly.
Add spread arguments in argument-list (rather than an apply primitive).
Much more detail in the Source Code Model section.
Clarify initialization of multi-valued slots.
3-Nov-2008 Add List Comprehensions section.
15-Nov-2008 Add the something type to fix a protocol bug.
Rename sequence to array, iterable to sequence, source-location to source-locator, advance-iteration to advance, current-element to next, etc. for clarity.
Split off assignable-source-locator.
Deconfuse collection versus sequence.
Add the stream protocol.
Clarify that the difference between punctuation and other names is only in whether delimiting characters are required, and in the syntactic type variable.
Newlines and keywords are tokens.
Simplify and clarify the explanation of newline handling accordingly.
Eliminate unnecessary name-in-module class.
Replace lexer with token-stream and a more rational protocol. Templates return token sequences, not lexers nor streams. This leads to considerable simplification.
Replace mode argument to parsers with a simple error? argument.
defparser, defsyntax, defmacro, operator macros implicitly define source-file and source-line.
Rewrite hygiene section for clarity.
Deconfuse blocks versus bodies.
Merge with-exit and unwind-protect into group, thence into body, and rename group to do.
Add Definitions at Macro Expansion Time section.
Rename {...}1 to [...]+.
Use spread arguments instead of apply function.
Fix syntax of case statement to be LL(1).
Remove [:= kludge.
Fix many small errors in the examples.
30-Dec-2008 The cleanup: keyword in a body must be exdented.
1-Jan-2009 Fix arguments to match-line-group? and continue-line-group?
18-Jan-2009 Fix indentation rules in templates.
25-Jan-2009 match, match?, and match! take a skip-newline keyword argument.
Deconfuse use of ^ and ~^ after & in patterns.
Parameter list is optional in defclass.
Fix scope of exit:, result:, and cleanup: in bodies of iteration statements.
27-Jan-2009 Add defmacro-block.
21-Feb-2009 Fix definition of reduce.
22-Feb-2009 Fix explanation of macro-context.
Clarify rules for where newline tokens can appear.
Add loop-body syntactic type.
26-Feb-2009 Fix incorrect placement of => in many example macro definitions.
Add example definition of while statement.
Add missing constructor: in defclass definition.
1-Mar-2009 Proofreading and final fixes.
12-Mar-2009 do exit: can't work because of scope conflict, so remove it. Only block allows exit:.
Add scope slot to with-exit-expression.
Fix parse-block to handle exit: properly.
Clarify partial evaluation.
Add multi-valued slot access as an array.
Add Code Walking section.
25-Mar-2009 Add slides from my ILC '09 talk.
29-Mar-2009 Fix terminological laxness: LR(1), abstract syntax tree, partial evaluation.
Use "P-expression" as the name for the object-oriented representation of source code.
Clarify that P-expressions do not have name scopes resolved.
Fix highly confused string templates concept.
Remove unnecessary function same-definition?, use known-definition instead.
Add match-bound-particle? helper function.
Get rid of defmacro-block, clarify which statements create new blocks.
Remove previous-context arguments to parsers and macros. They are only used for anaphoric macros, which can get the previous context by dynamic scoping.
Second argument to wrong-token-error can be a collection of possibilities.
The class range is both a collection and a type.
Redesign type-specifiers to be the same as ordinary expressions except that all names in a type-specifier have an implicit $ prefix. Add the typed-variable syntactic type. Explain how the def statement uses this.
Add literal as a type.
Include examples from my ILC 2009 talk.
Add eval-once to Code Walking section.
Add syntax: keyword to Program Syntax section.
Add Enumeration Types section.
Add Regular Expressions section.
Clarify the meaning of accessing a multi-valued slot as an array.
Fix some typos.
8-Apr-2009 Rework definition P-expressions with a distinct subclass for each case.
13-Apr-2009 Add Executable Code Classes section.
Better names for some of the P-expression classes.
Get rid of assignable-source-locator and pass the source location to the compound-expression constructor by dynamic scoping instead. This works much better, macros do not need two extra arguments to keep track of source locations, and now all P-expression objects are immutable, at least in their public API.
Explain add versus adjoin.
Explain the range class better.
Better documentation of some of the data classes.
Explain the class class better.
The mimic function also works on functions.
Mention #/xyz syntax.
Explain how curryable-invocation works with spread arguments.
Fix current vs root module confusion in the Modules section.
Move the for macro to its own section and make it extensible.

Previous page   Table of Contents   Next page