<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>199452</bug_id>
          
          <creation_ts>2019-07-03 09:59:39 -0700</creation_ts>
          <short_desc>WebKit has too many ways to stringify things</short_desc>
          <delta_ts>2021-02-02 02:44:25 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Template Framework</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>199782</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Darin Adler">darin</reporter>
          <assigned_to name="Darin Adler">darin</assigned_to>
          <cc>fpizlo</cc>
    
    <cc>mitz</cc>
    
    <cc>mrobinson</cc>
    
    <cc>sam</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1549901</commentid>
    <comment_count>0</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2019-07-03 09:59:39 -0700</bug_when>
    <thetext>WebKit has too many different ways to stringify things. Here are the ones I have found so far:

std::ostream
WTF::makeString (part of WTF’s StringConcatenate)
WTF::ValueToString 
WTF::LogArgument (part of WTF::Logger)
WTF::PrintStream dump functions
WTF::TextStream

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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1551098</commentid>
    <comment_count>1</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2019-07-08 19:03:13 -0700</bug_when>
    <thetext>WTF::StringBuilder</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1596623</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2019-12-07 13:59:56 -0800</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1602775</commentid>
    <comment_count>3</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-01-04 11:52:21 -0800</bug_when>
    <thetext>TextStream has some anomalies in how it serializes floating point numbers, always using fixed position with two decimal places.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1636198</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-03-31 13:02:41 -0700</bug_when>
    <thetext>We’ve made progress on unifying makeString and StringBuilder, by having StringBuilder::append be built on the same underpinnings as makeString!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1636199</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-03-31 13:03:37 -0700</bug_when>
    <thetext>In bug 199782 I deleted ValueToString. One down!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1636200</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-03-31 13:04:09 -0700</bug_when>
    <thetext>(In reply to Darin Adler from comment #3)
&gt; TextStream has some anomalies in how it serializes floating point numbers,
&gt; always using fixed position with two decimal places.

We can control that with FormattingFlags (which itself should be an OptionSet&lt;&gt;).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1636203</commentid>
    <comment_count>7</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-03-31 13:06:06 -0700</bug_when>
    <thetext>Yes. I was focusing on the default behavior, not the customizability of it</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>