Use Key instead of MiniscriptKey - #375
Conversation
|
Over time, I have been liking shorter names. I see the pros and cons of this. I am okay with
Deriving |
|
I'm fine with On the other hand since edition 2018 you can do |
|
Light bulb moment, what about we add this as well? |
|
oo, I like it! ok, ACK renaming to |
3dffa08 to
44791dd
Compare
|
Changes in force push:
|
7c40009 to
c3c5959
Compare
|
In the same vein we could shorten Above includes shorter generic identifiers also, I don't see why we use |
Yes. This PR can be re-done at anytime. It requires only a single command (a shell alias I have) to search-and-replace |
|
Agreed, keeping this as the last PR to merge. |
|
Making this draft because I do not know how to time it, it can be done mechanically at any stage if/when we feel its needed. |
One of the main traits in this lib is `MiniscriptKey`, we can shorten this to `Key` with no loss of meaning. This makes the whole codebase more terse. Terse code, if clear, is easier to read because there is less clutter. Also terseness assists the formatter and can reduce lines of code. This patch is the result of running `s/MiniscriptKey/Key/g` on all source files and then running the formatter. To preserve backwards compatibility and make the library more ergonomical to use; add a 'trait alias' of `MiniscriptKey` -> `Key`.
c3c5959 to
62b1e40
Compare
|
Too invasive. |
One of the main traits in this lib is
MiniscriptKey, we can shorten this toKeywith no loss of meaning. This makes the whole codebase more terse. Terse code, if clear, is easier to read because there is less clutter. Also terseness assists the formatter and can reduce lines of code.This patch is the result of running
s/MiniscriptKey/Key/gon all source files.Notes
This is an invasive change, I will not be offended if review is a simple 'no'. Outside the
miniscriptlibrary users can still dominiscript::Keyif the trait is too terse for their taste.