Steven Schveighoffer wrote:
On Thu, 12 Nov 2009 17:13:06 -0500, Andrei Alexandrescu <seewebsiteforem...@erdani.org> wrote:

Bill Baxter wrote:
On Thu, Nov 12, 2009 at 1:54 PM, Andrei Alexandrescu
<seewebsiteforem...@erdani.org> wrote:

Let's not forget that this is mainly for debugging...
If it's mainly for debugging maybe it's not worth spending time on.
 Nonsense!  Developers spend a lot of time debugging.  Helping people
debug their programs is certainly worth spending time on.
 --bb

Sorry sorry. I just meant to say it's not worth coming with an airtight design. We might afford some extra conversions and extra virtual calls I guess.

But that being said, I'd so much want to start thinking of an actual text serialization infrastructure. Why develop one later with the mention "well use that stuff for debugging only, this is the real stuff."

The main purpose to serialize is to be able to deserialize. The main reason to print debug information is so a person can read it. I don't know if those two goals overlap enough.

I think we need both. Maybe one uses the other, I'm not sure, but a way to say "here's how you interact with writefln and friends" would be very nice.

-Steve

I'd add to that the a format facility should be locale aware as in .Net.
i.e: (pseudo-code)

auto str = format("{0}", 2.4, CurrentCulture);
// or specify a specific locale

str will be either "2.4" or "2,4" based on locale.

this serves an entirely different purpose from serialization even though both have common parts.

you can't and shouldn't try to de-serialize the above text representation.

Reply via email to