Annotation of researchv10no/cmd/sml/doc/refman/compat.tex, revision 1.1.1.1

1.1       root        1: \chapter{Compatibility}
                      2: The language definition has changed a bit over the past year
                      3: (1986--87), particularly in the area of exception syntax.  Some
                      4: attempt has been made to allow old programs to continue running.
                      5: \section{Exceptions}
                      6: Three keywords: \verb"exceptionx", \verb"raisex", and \verb"handlex"
                      7: are provided.  They implement the old-style exception mechanism, and
                      8: are treated as derived forms.
                      9: \begin{tabular}{@{}l l}
                     10: \multicolumn{1}{c}{\bf Derived Form}&
                     11: \multicolumn{1}{c}{\bf Equivalent Form} \\ \hline
                     12: \verb"exceptionx" identifier & \verb"exception" Identifier \\
                     13: \verb"exceptionx" identifier \verb":" ty & \verb"exception" Identifier \verb"of" ty \\
                     14: 
                     15: \verb"raisex" identifier & \verb"raise" Identifier \\
                     16: \verb"raisex" identifier \verb"with" exp& \verb"raise" Identifier \verb"(" exp \verb")" \\
                     17: 
                     18: \verb"handlex" ident \verb"=>" exp & \verb"handle" Ident \verb"=>" exp \\
                     19: \verb"handlex" ident \verb"=>" exp & \verb"handle" Ident () \verb"=>" exp \\
                     20: 
                     21: \verb"handlex" ident \verb"with" pat \verb"=>" exp & \verb"handle" Ident pat \verb"=>" exp \\
                     22: \hline
                     23: \end{tabular}
                     24: 
                     25: The derivations for \verb"handlex" are a bit more intricate than
                     26: shown above.  The intent is that any program that works under the old
                     27: scheme will continue to work if all instances of \verb"exception",
                     28: \verb"handle", and \verb"raise" are changed to 
                     29:  \verb"exceptionx", \verb"handlex", and \verb"raisex" respectively.
                     30: 
                     31: Note that the derived forms change the exception identifier in
                     32: converting to the standard forms; they capitalize the first letter.
                     33: This is to simulate the old scheme, in which exception names lived in
                     34: a different space from value names.  This will cause problems in any
                     35: programs with a capitalized value-name that happens to conflict with
                     36: a (capitalized or uncapitalized) exception name.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.