Re: New library num-base-converters

From:

Stefan Monnier

Subject:

Re: New library num-base-converters

Date:

Tue, 15 Aug 2017 03:55:19 -0400

User-agent:

Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> +(defun nbc-number-base-converter (num base-in base-out)
> + "Translate NUM, a string representing an integer, to a different base.
> +BASE-IN, an integer, is the basis of the input NUM.
> +BASE-OUT, an integer, is the basis to display NUM."
Having a string as both input and output is a bad API, I think.
All one needs is basically to add a `base` arg to number-to-string
(there's already one for string-to-number).
Stefan