Bug 199452 - WebKit has too many ways to stringify things
Summary: WebKit has too many ways to stringify things
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Darin Adler
Depends on: 199782
  Show dependency treegraph
Reported: 2019-07-03 09:59 PDT by Darin Adler
Modified: 2020-01-04 11:52 PST (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2019-07-03 09:59:39 PDT
WebKit has too many different ways to stringify things. Here are the ones I have found so far:

WTF::makeString (part of WTF’s StringConcatenate)

WTF::LogArgument (part of WTF::Logger)
WTF::PrintStream dump functions

I plan to remove WTF::ValueToString first, changing the only client (POD trees) to use TextStream instead. I would welcome other ideas for how to get rid of this redundancy.
Comment 1 Darin Adler 2019-07-08 19:03:13 PDT
Comment 2 Darin Adler 2019-12-07 13:59:56 PST
Seems like we should remove PrintStream and replace it with TextStream. One way to do it is to make PrintStream use TextStream and then remove it a bit at a time.
Comment 3 Darin Adler 2020-01-04 11:52:21 PST
TextStream has some anomalies in how it serializes floating point numbers, always using fixed position with two decimal places.