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

Re: Proposal: conversion functions



Alexey Radul wrote:
I agree with Taylor that the name list->list is confusing.  The
proposed specification of that function also strikes me as very poor,
for the reason that you have to know what you are putting in to know
what you are going to get out.  I would much rather see a function
named list->random-access-list (and another named list->standard-list
or list->linear-list) that accepts any kind of list and produces one
of the desired type.  That name already suggests that the function may
act as the identity operation on some inputs; in a system where all
lists were random-access, list->random-access-list would very well
always be the identity function.

(On a system in which all lists were random-access, both would be identities, right?)

OK, I'm not terribly attached to `list->list' and I'm willing to do whatever seems to be the consensus here.

This proposal seems different than (my interpretation of) Campbell's. The choice I see is between functions for:

   * generic -> specific (Radul)
   * specific -> specific (Campbell)

So let me ask, which do people prefer?

I appreciate the comments on generic operations, but as you noted, this is beyond the scope of this SRFI.

David