News for hackers. Stuff that matters.
Re:Abbrev: A Hidden Ruby Gem by tlonny on Friday August 18, 2023 @09:31AM (#37175358)
Right, but I guess OP's point was that its not immediately obvious that this is a breaking change - and thus why the proposed usage is dangerous.
Re:Abbrev: A Hidden Ruby Gem by gwern on Friday August 18, 2023 @11:09AM (#37176735)
Indeed, how could the dev know? Are you assuming the developer is omniscient and knows every abbreviation used worldwide? Realistically, he has not the slightest idea anyone is using 'sta' and so wouldn't know to hardwire an override.
Re:Abbrev: A Hidden Ruby Gem by thedanbob on Friday August 18, 2023 @12:24PM (#37177983)
My point was that the dev knows "sta" is currently available as an abbreviation for "start", and when he adds "status" it no longer will be. So if he wants to maintain strict backwards compatibility he should add it back in manually. It's no longer unambiguous, but it does maintain the previous behavior.

Of course I personally would go with option two, where its documented that the abbreviations exist but are subject to change and you shouldn't rely on them.

Re:Abbrev: A Hidden Ruby Gem by gwern on Friday August 18, 2023 @09:18PM (#37184414)
The dev also "knows" that 'star' is available as an abbreviation. And in a realistic set of options for a real tool like git, there might be combinatorially many possible abbreviations which he now has to "know" and think about every possible intersection or ambiguity.