Richard Harter’s World
Home page for San
San specifications
Comp. Sci.
October 2008
email

San specification revisions – October 1, 2008

This page describes the October 1, 2008 revisions to the San programming language specification.

This is a fairly substantial revision that makes changes to almost every section, including reordering and renumbering sections. There are further substantial revisions that are planned. These include sbutstantially revising section 2 to include language objectives and a discussion of implementation modes. The sections on sequents and configuration segments need a substantial rework.

  1. Keywords start with an initial upper case
    Original text: In the original text identifiers and keywords were entirely lower case.
    New text:Identifiers are still entirely lower case. Keywords are lower case with the initial letter capitalized. Backslash is no longer a special character.
    Rationale: This change is part of a general program to reduce the complexity of the language syntax. Keywords and identifiers are now in separate lexical spaces; there is no potential present or future conflict between keywords and identifiers.
    Impact: Code examples and definitions were changed in almost every section.

  2. Sections renumbered and reordered
    Original text: In the original text the order of the major sections reflected the order in which they written.
    New text:Sections were reordered and renumbered.
    Rationale: The new order is supposed to provide a more logical progression.
    Impact: Links had to be changed.

  3. Flow control section rewritten
    Original text: The original section was sort of a grab bag of flow control constructs.
    New text:Constructs were eliminated, e.g., the “filter” constuct, until loops, compound loops, and the cycle keyword. Two new constructs were added, Andif and Orif. The escape keyword was replaced by Exitif with slightly different semantics. The concept of a conditional code chain was introduced. The switch construct was simplified.
    Rationale: The original constructs were somewhat of a mess. In particular the filter construct was awkward; the Andif and Orif constructs provide a simpler, cleaner alternative.
    Impact: Links had to be changed.

  4. Return verbs were expanded
    Original text:There was one return verb, Return.
    New text:Two new verbs, Fail and Yield, have been added.
    Rationale: Two new features have been added. The first distinguishes between success (Return) and failure (Fail) of an invocation. The second enables generators and coroutines.
    Impact: The section on procs has been revised.

  5. Change print and println to puts and print
    Original text:Print printed text without a terminating newline; println printed text with a terminating newline.
    New text:Print is replaced by Puts, and println by Print.
    Rationale: This is the second rename for these two functions. Originally they were rawprint and print, which seemed a bit cumbersome. They were changed to print and println; it was deemed odd to have the more common form longer. They have been changed to Puts and Print; puts is the C “put string” function.
    Impact: Code examples were changed.

  6. The obligatory begin was removed
    Original text:Block initiators of all kinds had an initial begin keyword.
    New text:The obligatory begin has been removed. The Begin keyword is still used for simple blocks.
    Rationale: The original begin/end formulation was like parentheses in lisp. The delimiter-keyword-parameters-EOL-body-delimiter structure has been retained but the keyword also serves as the initial delimiter.
    Impact: Code examples were changed.

  7. Appendices were rewritten
    Original text:There were several appendices covering sundry categories of keywords. There was no complete list of keywords.
    New text:The several appendices were replaced by a single appendix that is a comprehensive compendium of keywords.
    Rationale: The move to initial capital keywords has removed the need for special cases, so the appendices had to rewritten anyway. Adding a complete list was desirable.
    Impact: Old appendices were replaced and sundry links had to be revised.

  8. Delete naked identifiers
    Original text: The original specification permitted naked identifiers, e.g. an identifier beginning with an apostrophe or period that referred to the object the code was in. It also has the Self keyword to stand for the current object.
    New text:Naked identifiers have been eliminated.
    Rationale: Naked identifiers came first; it turned out that a Self keyword was unavoidable. There is no need for having both.

  9. Argument/value pair argument lists have been deleted
    Original text: The original specification permitted permitted argument/value argument lists, e.g. if foo is a proc with argument x we could write
                foo x=5
            

    New text:Argument/value pair argument lists are no longer permitted.
    Rationale: The syntax was ambiguous.

  10. Exponentiation operator changed
    Original text: The caret, ^, was the logical xor operator and ** was the exponentiation operator.
    New text:The caret is now the exponentiation operator, and there is no logical xor operator.
    Rationale: ** was an anomaly among special characters. Logical xor is not used often enough to warrant reserving a special character for it.

  11. Executive segment replaced by program
    Original text: There was an executive segment that essentially listed a program and a configuration.
    New text:The segment has been renamed as Program and the “program” keyword has been renamed as Entry.
    Rationale: Terminology better matches intended usage.

  12. Three levels of agents
    Original text: A thread could have several principal agents.
    New text:There are three levels of agents, a supervisory agent created by the San execution engine, one or more principal agents directly below the master agent, and subordinate agents under the principal agents.
    Rationale: This change facilitates having a variety of execution modes. Thus San might be run as an interactive shell, as a script file, or as a suite of embedded threads in another program. The entire notion of threads as a container of agents is being eliminated; agents are threads and threads are agents.

Richard Harter’s World
Home page for San
San specifications
Comp. Sci.
October 2008
email