>
> Maybe there should be an interface for declaring the default output format
> for a specific type, similar to stream formatting in C++?


I started down this path, made a PR to Formatting, but no one ever
commented or merged it, so I assume no one cares about this functionality.
Here it is if you're curious:

https://github.com/JuliaLang/Formatting.jl/pull/10

On Wed, Sep 16, 2015 at 6:21 PM, J Luis <[email protected]> wrote:

> I also find that the hex printing without specifically requiring it is
> very annoying.
>
>
> quarta-feira, 16 de Setembro de 2015 às 23:08:23 UTC+1,
> [email protected] escreveu:
>>
>> On Wednesday, September 16, 2015 at 5:38:30 PM UTC-4, Steven G. Johnson
>> wrote:
>>
>>> It's not a bug, it's intentional.  The feeling is that most applications
>>> of UInt** types are using them as bitstrings, in which cases a hex display
>>> is more useful.
>>>
>>
>> UInt is very useful for catching signed integers occurring in places they
>> shouldn't, so I use it whenever I explicitly expect a number to be
>> unsigned. I think this usage should be encouraged, but having UInt print
>> hex seems to discourage this. That said, those routinely dealing with
>> binary strings would want a hex output. Maybe there should be an interface
>> for declaring the default output format for a specific type, similar to
>> stream formatting in C++?
>>
>

Reply via email to