[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: floating point and other comments

This page is part of the web mail archives of SRFI 48 from before July 7th, 2015. The new archives for SRFI 48 contain all messages, not just those from before July 7th, 2015.



On Mon, Dec 22, 2003 at 06:01:12PM -0800, bear wrote:

> Since authoring SRFI-38 I have also thought of things it doesn't
> adequately cover.  But the ones I've thought of are often subtle,
> like the behavior of non-tree-structured data under eval.

That's interesting.  I don't think shared data-structures pose a
problem, but applying an infinite argument list is interesting.
However, since SRFI-38 is specifically about external representations
I don't think it needs to specify eval behavior.  That could be
covered in a future SRFI which perhaps also provides general circular
data structure traversal procedures.

> What specifically would you like to do differently?

One is mostly aesthetic, I really think read/write should handle
circular structures by default.  The same names are used in CL, they
match the format ~W mnemonic, and it just seems right that the
fundamental Scheme read/write operations are the most complete.  I
also fail to see the point of a separate read procedure, since for
non-shared data structures there is no difference and no overhead, and
for shared data structures the difference is between handling them and
signalling an error, which doesn't seem useful.

For write, however, there is significant overhead since you can't
avoid an O(n) lookup table.  If you've built a data structure that
takes up most of your memory you can't call write/ss on it.  So I
provided a non-shared-write (name undecided) which guarantees minimal
space usage.

-- 
Alex