[racket] string->number failure value

From: Marijn (hkBst at gentoo.org)
Date: Tue Aug 16 09:39:16 EDT 2011

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Upon failure to recognize a number string->number currently returns #f.
It would be nice if it was possible to supply the failure value as an
argument, the way it is possible for hash-ref. Problem with that is that
string->number currently takes an optional argument to determine the
radix in which the string should be interpreted as a number. If both
optional arguments were promoted to keyword arguments then there would
be no ordering problem. So I'd like to propose to change the signature
of string->number to:

(string->number string #:radix [radix 10] #:default [default #f])

What do you think?

Marijn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5KcwQACgkQp/VmCx0OL2x1kQCfWDXSVBwHnBncWna/F4W2SXWG
9QkAn1iVa9PNe2J/jXUoB7licro94SXd
=CZ+1
-----END PGP SIGNATURE-----


Posted on the users mailing list.