|
Boost : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-11-15 04:26:55
Gennadiy Rozental wrote:
>>> Ok, will do.
>>
>> But note that will can bloat the library. Showing hex data is a much
>> harder
>> thing that it seems, just look at the amount of suggestions made by
>> KDevelop users: http://lists.kde.org/?t=112549947100004&r=1&w=2
>>
>> (BTW, some of the wanted hexdumps exactly for looking at network packets,
>> just like Matt mentions in the previous email).
>>
>> I'd suggest supporting some very simple format, and resisting all user
>> requests to extend it. A separate GUI tool might be better suited for
>> showing hex dumps.
>>
>> - Volodya
>
> My library prints something like:
>
> 00000000 74 65 73 74 | 5F 73 74 72 | 69 6E 67
> test_string\n\n
> ....
>
> in total 50 lines of code.
Well, to print the above text I'd need exactly two lines of code:
std::cout << "00000000 74 65 73 74 | 5F 73 74 72 | 69 6E 67\n" <<
<< "test_string\\n\\n\n";
;-) Seriously, you comment above sounds more like asserting the quality of
your implementation, then anything else. Maybe it's a language barrier
issue.
If 50 lines is enough and those lines are simple, that's fine. What I
suggest to select one simple format and don't try to make it customizable
at all.
- Volodya
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk