Stream: t-compiler/wg-rls-2.0

Topic: Naming bikeshed: how to merge ranges?


matklad (Feb 25 2020 at 14:27, on Zulip):

https://github.com/rust-analyzer/text_unit/pull/1

What's the name of the operation that computes the least range containing two given ranges?

matklad (Feb 25 2020 at 14:29, on Zulip):

Options:

matklad (Feb 25 2020 at 14:30, on Zulip):
matklad (Feb 25 2020 at 14:30, on Zulip):
Emil Lauridsen (Feb 25 2020 at 14:34, on Zulip):

extend_to doesn't seem too bad. Might be a little confusing as it implies some sense of "direction", but not sure that's a big deal

Edwin Cheng (Feb 25 2020 at 14:45, on Zulip):
Edwin Cheng (Feb 25 2020 at 14:47, on Zulip):

If others understand this zulip topic, it should be named to merge tautologically :)

std::Veetaha (Feb 25 2020 at 14:47, on Zulip):
std::Veetaha (Feb 25 2020 at 14:47, on Zulip):
Edwin Cheng (Feb 25 2020 at 14:48, on Zulip):

extend_to and bounding_range are both good to me.

matklad (Feb 25 2020 at 14:49, on Zulip):

Let's pick extend_to: it looks better as a method, though, for a free function, bounding_range would be a better choice

Jeremy Kolb (Feb 25 2020 at 14:53, on Zulip):

If you want to be explicit I think extend_to_cover would save me from using a hover. An alternative would be a constructor that takes two ranges

Last update: Sep 22 2020 at 01:30UTC