[erlang-questions] printed maps look confusing

Vlad Dumitrescu vladdu55@REDACTED
Mon Feb 3 15:08:29 CET 2014


You're right I forgot about binaries. [[ should we use guillemets for
binaries?  «"hello"» :-)  That would even shorten the output a bit ]]

I'm a little worried about how the output in large logs.

@Björn-Egil: I don't use pretty printing of records, so I missed that
connection. I would probably have reacted to that too.

Anyway, maybe it's not a big deal.

regards,
Vlad



On Mon, Feb 3, 2014 at 2:58 PM, Loïc Hoguin <essen@REDACTED> wrote:

> Removing the spaces doesn't work at all. Example:
>
> #{<<"hello">>=><<"bye">>}
>
> Adding a space after the comma is OK but when pretty printing over lines
> of 80 characters it's going to make things a lot worse.
>
> The current solution sounds best to me. Just gotta get used to it.
>
>
> On 02/03/2014 02:44 PM, Vlad Dumitrescu wrote:
>
>> Hi!
>>
>> The default format for printing maps puts no space after the comma, but
>> only around the =>. The result looks confusing to me.
>>
>> #{2 => 3,4 => 5}
>>
>> 3 and 4 look more related than 2 and 3 or 4 and 5.
>>
>> Fixing this is a bit more job than adding a space, unless one wants to
>> add them to lists and tuples too. Removing the spaces around the arrow
>> doesn't look too nice either.
>>
>> I can write a patch, but what is the best solution?
>>
>> regards,
>> Vlad
>>
>>
>>
>>
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
> --
> Loïc Hoguin
> http://ninenines.eu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140203/e274ee52/attachment.htm>


More information about the erlang-questions mailing list