source: project/wiki/man/4/Deviations from the standard @ 25875

Last change on this file since 25875 was 25875, checked in by felix winkelmann, 9 years ago

merged some manual changes from master into wiki

File size: 3.3 KB
Line 
1[[tags: manual]]
2
3== Confirmed deviations
4
5Identifiers are by default case-sensitive (see [[Using the compiler]]).
6
7=== Number of arguments to procedures and macros
8
9The maximal number of arguments that may be passed to a
10compiled procedure or macro is limited to 120 (1000 on some
11common hardware platforms like x86).
12Likewise, the maximum number of values that can be passed
13to continuations captured using {{call-with-current-continuation}}
14is 120.  This is an implementation restriction that is unlikely
15to be lifted.
16
17
18=== {{numerator}}, {{denominator}} and {{rationalize}}
19
20The {{numerator}} and {{denominator}} procedures cannot be
21applied to inexact numbers, and the procedure {{rationalize}} is not
22implemented at all.
23
24
25=== Numeric string-conversion considerations
26
27The runtime system uses the numerical string-conversion
28routines of the underlying C library and so does only understand
29standard (C-library) syntax for floating-point constants.  Consequently,
30the procedures {{string->number}}, {{read}}, {{write}}, and {{display}} do not obey
31read/write invariance to inexact numbers.
32
33
34=== Environments and non-standard syntax
35
36Code evaluated in {{scheme-report-environment}} or
37{{null-environment}} still sees non-standard syntax.
38
39
40== Unconfirmed deviations
41
42=== {{char-ready?}}
43
44The procedure {{char-ready?}} always returns {{#t}} for
45terminal ports.
46
47
48
49== Doubtful deviations
50
51=== {{letrec}}
52
53{{letrec}} does evaluate the initial values for the bound
54variables sequentially and not in parallel, that is:
55
56<enscript highlight="scheme">
57(letrec ((x 1) (y 2)) (cons x y))
58</enscript>
59
60is equivalent to
61
62<enscript highlight="scheme">
63(let ((x (void)) (y (void)))
64  (set! x 1)
65  (set! y 2)
66  (cons x y) )
67</enscript>
68
69where R5RS requires
70
71<enscript highlight="scheme">
72(let ((x (void)) (y (void)))
73  (let ((tmp1 1) (tmp2 2))
74    (set! x tmp1)
75    (set! y tmp2)
76    (cons x y) ) )
77</enscript>
78
79It is unclear whether R5RS permits this behavior or not; in any case,
80this only affects letrecs where the bound values are not
81lambda-expressions.
82
83
84== Non-deviations that might surprise you
85
86=== {{let-syntax}} and {{letrec-syntax}}
87
88{{let-syntax}} and {{letrec-syntax}} introduce a new scope.
89
90
91=== {{equal?}} compares all structured data recursively
92
93{{equal?}} compares all structured data with the exception of
94procedures recursively, while R5RS specifies that {{eqv?}} is used for
95data other than pairs, strings and vectors.  However, R5RS does not
96dictate the treatment of data types that are not specified by R5RS
97
98
99=== No built-in support for bignums
100
101There is no built-in support for exact rationals, complex
102numbers or extended-precision integers (bignums). The routines
103{{complex?}}, {{real?}} and {{rational?}} are identical to
104the standard procedure {{number?}}. The procedures {{make-rectangular}}
105and {{make-polar}} are not implemented. Fixnums are limited to
1062^<nowiki><sup>30</sup></nowiki> (or 2^<nowiki><sup>62</sup></nowiki>
107on 64-bit hardware).  Support for the full numeric tower is available
108as a separate package, provided the GNU multiprecision library is installed.
109
110
111=== {{transcript-on}} and {{transcript-off}} are not implemented
112
113The {{transcript-on}} and {{transcript-off}} procedures are
114not implemented.  R5RS does not require them.
115
116---
117Previous: [[The R5RS standard]]
118
119Next: [[Extensions to the standard]]
Note: See TracBrowser for help on using the repository browser.