On Sat, Apr 28, 2018 at 2:10 AM, Allen Wyma <[email protected]> wrote:

I’m okay with the other options, it’s just, to me, I can see numbers that
> actually have meaning to be split at 3, makes sense. But an ID which is
> isn’t meant to be split, at least in my mind, shouldn’t be split every
> three characters.
>
> A DB ID is just an ID, not really carrying any significance when counting
> other than incrementally telling you which record it is when created.
>

The rationale is that integer literals are easier to read if split. A
hard-coded database ID is an integer, that's it.

In my experience, hard-coding database IDs you later need to grep is not
that common. You grep logs for IDs, but source code... I don't know, I have
no seen it a lot. Not even in test suites. Even when there are static
records like a table of countries, in the source code you normally access
them in a way that does not assume IDs.

I lean on the current trade-off, you get one sensible and uniform choice in
the formatter, which to me is the one that makes more sense. And if there's
some edge case for which this is not convenient... that's where the
trade-off becomes a trade-off :).

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAM%3DYcdgj10%3Dvf7TBcEDoyaH60iXxrX%2B-G-yhdw4%3DxuXj_J4Tcg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to