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

Re: Reasons for withdrawal

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



scgmille@xxxxxxxxxxxxxxxxxx wrote:
>>> This is flat wrong.  It allows one to consistently interchange
>>> values between the standard Scheme types ....

> Bradd W. Szonye wrote:
>> Last I checked, R5RS already provides that. You have heard of
>> vector->list et al, right?

> Yes, but you cannot do it generically.  I cannot use collection->list
> to convert any of the compound structures to lists, or use enumeration
> to convert any compound structure to any other.

If the only collections available are the R5RS primitives, it's trivial
to write collection->list. A programmer will need a more sophisticated
dispatch method if you extend the set of collections, but SRFI-44 does
not define that dispatch method.

A programmer cannot implement a new collection type without knowing the
details of the dispatch method. For example, suppose that I regularly
use PLT and Scsh, and they both provide SRFI-44. I write a grab-bag
collection and try to fit it into PLT's SRFI-44 framework. To do so, I
need to know how PLT implemented the generic dispatcher, so that I can
make it aware of my grab-bag. If I also want to implement grab-bag for
Scsh, I need to figure out how *they* implemented the dispatcher. Of
course, they aren't compatible, so I need to re-write half of my code.

>> Really? Lists and alists already use a common enumerator. It's
>> called "map." If you really need to deal with vectors and strings
>> too, it's trivial to roll your own enumerator. Your enumerator
>> doesn't even provide the multiple-collection capabilities of map and
>> SRFI-1 fold -- it's actually less capable than existing facilities.

> SRFI-1 fold applies only to lists.  But thanks for admiting that
> enumeration over vectors and strings would be useful.  

Yes, it is useful. But you're still missing the point. Between R5RS,
SRFI-1, SRFI-13, and a little glue code, a programmer can actually do
*better* than he can with SRFI-44.
-- 
Bradd W. Szonye
http://www.szonye.com/bradd