Remix.run Logo
jimbokun an hour ago

> Poetry does the same by default, using a format like >=1.23.4,<2.0.0. I find this less readable than ^1.23.4, but the effect is the same.

What???

I understood the first format instantly, but had no idea what the second meant until the author explained it.

pie_flavor 11 minutes ago | parent | next [-]

And then you look it up once, and now you know what it means forever. By contrast, the former expression is much wider with more going on, and furthermore you can't skim past it being sure nothing funny is going on because it may or may not be a range compatible with the latter form.

scubbo 5 minutes ago | parent [-]

> now you know what it means forever

Not, in fact, correct. Knowledge only cements itself in the brain when it's regularly referenced. Because `>=` and `<=` borrow well-established concepts well-established, they are both intuitive to people reading them for the first time, and easier to solidify or to re-infer for someone who's forgotten their meaning.

saghm an hour ago | parent | prev | next [-]

I don't know if there's a good source for where this convention started but it's not that uncommon; offhand, both npm[1] and Cargo[2] support that format.

[1]: https://docs.npmjs.com/about-semantic-versioning#using-seman... [2]: https://doc.rust-lang.org/cargo/reference/specifying-depende...

kjmr 23 minutes ago | parent | prev | next [-]

Once you know what the ^ means (I always think of “roof”), I do think that one character is easier to read than >=,<

jim33442 an hour ago | parent | prev | next [-]

I saw that ^ so many times in npm and never knew what it meant until now

skeledrew 41 minutes ago | parent | prev [-]

Same. I found that wild to take in.