guile-devel
[Top][All Lists]
Advanced

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

Re: propose deprecation of generalized-vector-*


From: Ludovic Courtès
Subject: Re: propose deprecation of generalized-vector-*
Date: Sat, 03 Nov 2012 00:27:34 +0100
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux)

Hi!

Daniel Llorens <address@hidden> skribis:

> today I filed a bug on generalized-vector->list
>
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12465
>
> I remember similar bugs in the past, and I'm thinking that these functions 
> are redundant since we have array-ref, array->list, and so on, which also 
> work on strings, uniform vectors, etc.

Agreed.

> The only generalized-vector-? function that doesn't have a direct array-? 
> correspondence is generalized-vector-length. However, even for arrays of rank 
> > 1 it is often convenient to have a function such as
>
> (array-length a) = (car (array-dimensions a))
>
> or maybe
>
> (array-length a) = (fold * 1 (array-dimensions a))
>
> Personally I'd favor the first as there's nothing to compute, but either 
> would work to replace generalized-vector-length.

Yes.  That procedure would only make sense for one-dimensional arrays
anyway.  It could just as well throw an error when passed a
multi-dimensional array, no?

[...]

> TLDR, I propose to remove the generalized-vector-? functions since the 
> array-? set can replace them.

I think I agree, but I’d like to hear what Andy thinks, since he’s done
a major overhaul of this part recently (and actually, thanks to this,
generalized-vectors.c is very small.)

Thanks,
Ludo’.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]