What about making the atoms a bit clearer? e.g. `:a_lt_b` and `:a_gt_b` to
replace `:lt` and `:gt`? You can always introduce a third optional flag to:
`DateTime.compare/2` to maintain backwards compatibility:
`DateTime.compare(a, b, verbose: false)`

On Sun, Oct 30, 2022 at 3:15 AM José Valim <jose.va...@dashbit.co> wrote:

> I am definitely in favor of clearer APIs.
>
> However, it would probably be best to explore how different libraries in
> different languages tackle this. Can you please explore this? In
> particular, I am curious to know if before/after mean "<" and ">"
> respectively or if they mean "<=" and "=>" (I assume the former). And also
> if some libraries feel compelled to expose functions such as
> "after_or_equal" or if users would have to write Date.equal?(date1, date2)
> or Date.earlier?(date1, date2), which would end-up doing the double of
> conversions.
>
> --
> 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 elixir-lang-core+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2B3oDVk5hpF7EpfZt4Xa0k7v1Rk%2BxFF9eGtWCXmO4JfpA%40mail.gmail.com
> <https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2B3oDVk5hpF7EpfZt4Xa0k7v1Rk%2BxFF9eGtWCXmO4JfpA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAAkfbUqg81OarngJ15LP2A5q1AGOTmRTQLv6v-VTt5oGDn%2Bhgg%40mail.gmail.com.

Reply via email to