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

Re: Fundamental design flaws




On Thu, 30 Oct 2003 scgmille@xxxxxxxxxxxxxxxxxx wrote:

>On Thu, Oct 30, 2003 at 10:48:34AM -0800, bear wrote:
>>
>>
>> On Thu, 30 Oct 2003 scgmille@xxxxxxxxxxxxxxxxxx wrote:
>>
>> >I'd like to know what beyond lacking collection specific shortcut
>> >functions is inefficient in the current SRFI.
>>
>> You're joking, right?  Without the "shortcut functions" as you call them
>> being more efficient, there is no reason for most of these collections to
>> exist at all.
>
>But they cannot be defined if they don't apply to the general class of
>collections.  They need to be defined for those concrete classes or a
>more specific general one (like ordered tree).

Of course they can be defined for generic collections.  You can get
the last element of a list; it's just the worst possible structure
for that operation to be efficient.  Similarly, you can get a range
of keys from an unordered alist, or any of the other "shortcut"
operations.

The "generic" functions you're looking for will be used as building
blocks to implement these things if you don't make a space for them.
And the implementations based on the "generics" will be even worse
than directly implementing something a particular datastructure is
inefficient for.

These aren't "shortcuts" -- They are, in fact, the critical path.

			Bear