Option ShortName of variable length

Jan 20, 2016 at 10:19 AM
Hi,

have you ever considered, that the ShortName of the Options Attribute could also be a string instead of a char? One could than have a longer shortName than the LongName, but it would be more flexible and wouldn't hurt the overall concept from my point of view.

Best regards
David
Jan 20, 2016 at 11:43 AM
As a user of the library, I somehow wished for that, but I guess you'd have to ensure that no other short name of any other option is a substring of your longer short name, right?
Jan 20, 2016 at 1:33 PM
I can't really think of a problem with substrings shared between ShortNames. -aa and -aaa look quite distinguishable. Maybe I'm missing something here.
But you made me realize that long ShortNames would break grouping, as -a -b grouped to -ab couldn't be distinguished from the short form -ab.
Jan 20, 2016 at 3:15 PM
Edited Jan 20, 2016 at 3:16 PM
Exactly, that's what I meant. Indeed, "-aa" and "-aaa" wouldn't be a problem on their own, but if there's also "-a", it's not clear whether "-aaa" is really "-aaa", or "-a -aa".

And before these possibilities get checked, it might be more algorithmically economical to just disallow any short names that are substrings of other short names.