concept-extensions.tex 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. %-*- Mode: TeX -*-
  2. %%Language Extensions
  3. \issue{EXTENSIONS-POSITION:DOCUMENTATION}
  4. A language extension is any documented \term{implementation-defined} behavior
  5. of a \term{defined name} in this standard that varies from the
  6. behavior described in this standard, or a documented consequence of a
  7. situation that the standard specifies as undefined, unspecified, or
  8. extendable by the implementation. For example, if this standard says
  9. that ``the results are unspecified,'' an extension would be to specify
  10. the results.
  11. \reviewer{Barmar: This contradicts previous definitions of conforming code.}
  12. If the correct behavior of a program depends on the results provided
  13. by an extension, only implementations with the same extension will
  14. execute the program correctly. Note that such a program might be
  15. non-conforming. Also, if this standard says that ``an implementation
  16. may be extended,'' a conforming, but possibly non-portable, program
  17. can be written using an extension.
  18. An implementation can have extensions, provided they do not alter the
  19. behavior of conforming code and provided they are not explicitly
  20. prohibited by this standard.
  21. \endissue{EXTENSIONS-POSITION:DOCUMENTATION}
  22. The term ``extension'' refers only to extensions available upon
  23. startup. An implementation is free to allow or prohibit redefinition
  24. of an extension.
  25. The following list contains specific guidance to implementations
  26. concerning certain types of extensions.
  27. \beginlist
  28. %\itemitem{\b{Additional syntax}}
  29. %
  30. %An implementation is not allowed to extend \term{macros}
  31. %and \term{special forms} to take
  32. %additional syntax not specified in this standard.
  33. %\itemitem{\b{Extra optional or named arguments}}
  34. %
  35. %Unless explicitly allowed in this standard,
  36. %implementations are not allowed to include definitions
  37. %of \term{functions} with extra optional or named arguments
  38. %with system-dependent meanings.
  39. %
  40. %When extra optional or named arguments are allowed by this
  41. %standard, they will be annotated as follows:
  42. %\term{functions} that may be
  43. %extended to take implementation-specific optional arguments are indicated
  44. %by \f{&rest ignore} in their argument list.
  45. %\term{functions} that may be extended
  46. %to take additional keyword parameters are indicated by \keyref{allow-other-keys}.
  47. %
  48. %The goal is not to outlaw any extensions currently offered by
  49. %implementors, but to make the range of extensions to \term{functions}
  50. %defined in
  51. %this standard well documented in this standard. Implementations that want to
  52. %extend \term{functions} that aren't explicitly
  53. %allowed to be extended can instead
  54. %shadow them.
  55. %
  56. % or as follows, if this proposal passes.
  57. %Alternate proposal: NOT-IN-STANDARD-PACKAGE
  58. %
  59. %Like NO-EXCEPT-AS-ALLOWED, except that an implementation may always
  60. %provide additional named arguments to a function if the names are not in
  61. %an implementation-specific package (the list of these currently includes
  62. %the LISP, USER, and KEYWORD packages).
  63. %
  64. \itemitem{\b{Extra return values}}
  65. \issue{EXTRA-RETURN-VALUES:NO}
  66. An implementation must return exactly
  67. the number of return values specified by this standard unless the
  68. standard specifically indicates otherwise.
  69. \endissue{EXTRA-RETURN-VALUES:NO}
  70. %\itemitem{\b{Function behavior on non-standard data types}}
  71. %
  72. %An implementation does not define the behavior of \term{functions}
  73. %on \term{types} not explicitly permitted by this standard.
  74. \itemitem{\b{Unsolicited messages}}
  75. \issue{UNSOLICITED-MESSAGES:NOT-TO-SYSTEM-USER-STREAMS}
  76. No output can be produced by a function other than that specified in
  77. the standard or due to the signaling of \term{conditions}
  78. detected by the function.
  79. Unsolicited output, such as garbage collection notifications and
  80. autoload heralds, should not go directly to the \term{stream}
  81. that is the value of a \term{stream} variable defined in this
  82. standard, but can go indirectly to \term{terminal I/O} by using a
  83. \term{synonym stream} to \varref{*terminal-io*}.
  84. Progress reports from such functions as \funref{load} and
  85. \funref{compile} are considered solicited, and are not covered by
  86. this prohibition.
  87. \endissue{UNSOLICITED-MESSAGES:NOT-TO-SYSTEM-USER-STREAMS}
  88. \itemitem{\b{Implementation of macros and special forms}}
  89. %Operators that are defined as \term{macros} or
  90. %\term{special forms} may be defined as \term{functions}
  91. %instead if the semantics can be preserved.
  92. %
  93. %or as follows:
  94. %Alternate Proposal: MACRO-AS-FUNCTION:STATUS-QUO
  95. %
  96. %The standard will remain silent on the issue of whether or not is
  97. %is valid for an implementation to implementation "macros" and
  98. %"special forms" as functions.
  99. \issue{MACRO-AS-FUNCTION:DISALLOW}
  100. \term{Macros} and \term{special operators} defined in this standard
  101. must not be \term{functions}.
  102. \endissue{MACRO-AS-FUNCTION:DISALLOW}
  103. \endlist