[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] string-fill!
-----BEGIN PGP SIGNED MESSAGE-----
On 07/01/2012 06:02 AM, Marc Feeley wrote:
> This has probably been mentionned before, but the second parameter
> of string-fill! on page 45 has the name "char", but the text
> mentions the parameter "fill". For consistency with the other
> ...-fill! procedures, it should be called "fill".
I bet this came about in a rewrite, specifically to use
the name "char" in the function signature in order to
specify that the argument must be a character. This is
normative in the standard, so renaming the char to "fill",
unless accompanied by other edits, would leave the type
of the argument underspecified.
This type of indication is inappropriate for procedures
such as vector-fill! because the fill argument in that
procedure is in fact not specified as to type.
Type-indicative naming is appropriate for u8vector-fill!
or bytevector-fill! or whatever it winds up getting
named, but I don't think that the standard has yet
adopted argument names indicating that particular
subtype of integer.
Still not convinced that byte vectors were standard-
worthy in the first place. There is no algorithm that
works on a byte vector which does not work on a standard
scheme heterogenous vector, so clearly they are nothing
more than a performance hack. And I think the performance
hack could have been done by other less intrusive and
more general means.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
Scheme-reports mailing list