But we still don't give their length in the description.
@egallesio -- the %uvector-length procedure takes an integer (the tip) and a uvector. For describe, it would make sense to have a wrapper that does not need the tip, so we can also report the length.
What do you think is better?
Add a new procedure, like %general-uvector-length that only takes a uvector? Something that would only do
return MAKE_INT(UVECTOR_SIZE(v));
and just return the length?
Change %uvector-length to subr12, so it can be called with args (tip uvec) or (uvec)
Write a general API for uvectors that do not require the user to include the uvector type? That would include
uvector-length, uvector-{ref,set}, uvector->list, uvector?... (The last one really makes sense - -SRFI 4 does not offer a general uvector? predicate... See that the code in this PR uses is-a?)
But we still don't give their length in the description.
@egallesio -- the
%uvector-length
procedure takes an integer (the tip) and a uvector. Fordescribe
, it would make sense to have a wrapper that does not need the tip, so we can also report the length.What do you think is better?
Add a new procedure, like
%general-uvector-length
that only takes a uvector? Something that would only doand just return the length?
Change
%uvector-length
tosubr12
, so it can be called with args(tip uvec)
or(uvec)
Write a general API for uvectors that do not require the user to include the uvector type? That would include
uvector-length
,uvector-{ref,set}
,uvector->list
,uvector?
... (The last one really makes sense - -SRFI 4 does not offer a generaluvector?
predicate... See that the code in this PR usesis-a?
)not report the length
Some other possibility?