[armedbear-devel] RfC: Renaming LispObject.writeToString() to LispObject.printObject()
ville.voutilainen at gmail.com
Thu Jul 14 18:51:10 UTC 2011
On 14 July 2011 21:42, Erik Huelsmann <ehuels at gmail.com> wrote:
> Yesterday, we fixed #154 -- the PRINT-OBJECT regression in 0.26.0. Once
> again, it turns out that our object printing and stringification routines
> are confusingly named. Additionally, they are also under documented: The
> writeToString() method calls toString(), but doesn't document the difference
> between the two.
> My idea would be to disambiguate the two functions by making writeToString()
> a java-side PRINT-OBJECT, renaming it to printObject() and documenting
> that's what it does. Then, probably, the lisp side function %write-to-string
> should be renamed to %print-object too. Probably, more adjustments are
> required throughout the code base, but those are probably at the
> 'implementation detail' level.
> So, what's your take on it?
By all means go for it. I've never quite understood why we have writeToString()
that calls toString(). Trying to find out from the codebase is
non-trivial, and even
our maintenance ends up making mistakes. Any clarification is a plus.
I suppose it's an API&ABI break, so perhaps we should deprecate writeToString()
first, I don't know. Perhaps don't deprecate, you'll get a census of users when
people complain about breakage. :D
More information about the armedbear-devel