-
Notifications
You must be signed in to change notification settings - Fork 152
Use Key instead of MiniscriptKey #375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK c3c5959
This is gonna cause a lot of merge conflicts..
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 toKey
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.Notes
This is an invasive change, I will not be offended if review is a simple 'no'. Outside the
miniscript
library users can still dominiscript::Key
if the trait is too terse for their taste.