Hi Al,
On a practical level, I would be sad if vector-ref, for example, was
"impure", and thus compiling a vector-ref invalidated all previously-
checked globals for the current scope. Likewise, I would prefer to
declare a procedure using vector-ref as pure, to let csc know that it
does not
Hi Al,
what does (declare (pure ..)) mean to csc? Is the function supposed to be
* only side-effect free, or ...
* also return the same value when called with the same arguments?
I can't remember where `(declare)` is documented, but I believe this [0]
is also relevant.
[0]
Hi Al,
What combination of
* define-record-type (srfi-9, srfi-99, chicken define-record, whatever) and
* (declare type ...)
can I use to inform the compiler that (for collections of myrec) vector-
ref returns myrec's (likewise list car/cdr, hash-table-ref)? And that it
needs not emit any
Oh I forgot to mention you need an extra compiler flag to use it
(-extend). And I also just remembered that I wrote a post about this at
the time. (:
https://siiky.srht.site/scheme/reader-syntax.html
Hi,
You can use reader syntax[0]. Take a look at this SQL reader syntax[1,2]
I wrote some time ago for inspiration (it should require very little
changing).
[0] https://api.call-cc.org/5/doc/chicken/read-syntax/set-read-syntax%21
[1]