-
Notifications
You must be signed in to change notification settings - Fork 40
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
Change Selector.by_leaves() to Selector.by_leaf() #698
Comments
👍 Sounds good to me. |
Ok cool. Wanted to make sure there wasn't a naming convention I was missing ;) Will make the change in my current score (ie, cleanup) branch and will merge into master when the branch is outta the oven. |
Cool. We should talk before we start merging stuff in, since my cleanup branch is getting pretty full too. |
Ok. If you want me to merge sooner rather than later, lemme know! |
No, no. Later is better. I want to teach you rebasing first. I also wanted to do a little bit of polishing on some of the changes I saw in your cleanup branch, to make the spanner changes easier for users to adapt to. There's a PR for merging into your cleanup branch that extends |
Cool. I saw that, which is great. Let's also make a (user-settable) flag, so that users can turn it on and off and -- hopefully -- eventually migrate entirely to the new way of attaching. (The convenience of the attach coercion is awesome! Just don't want users to slowly develop a false mental model of what's ultimately attaching to what.) |
I wonder about that though. The more composing I do in the system, there On Sun, Jun 19, 2016, 2:11 PM Trevor Bača notifications@github.com wrote:
|
And if there's only one kind of component spanners can attach to ever, why make users do the work of always collecting the correct components? Does enforced demonstration of knowledge of exactly how the system works outweigh the practicality of getting work done efficiently? |
I'm with you. The language hasn't ever really allowed for first-class signature polymorphism (as compared to, say, C++ or Mathematica). Which is probably what explains why coercion sometimes adds to our documentation burden: we add coercion features when what we really want is signature polymorphism. But signature polymorphism isn't recognized by Sphinx and friends (because it's never been a priority in Python itself). I've often wondered if the Zen-in-Python maxim of the principle-of-least-surprise (what PEP 20 states as "explicit is better than implicit") has been one of the language gods' drivers over the years that's kept more flexible signatures out of the language for so long. At any rate, probably best to keep the thinking focused on concrete cases (like your extensions to |
With you 100% And I'm sure we can find a way towards better polymorphic documentation of we dedicate ourselves to the problem actively. |
…HNAGE. This closes #698. CHANGE MANAGEMENT. Change should be communicated clearly to user base.
…HNAGE. This closes #698. CHANGE MANAGEMENT. Change should be communicated clearly to user base.
…HNAGE. This closes #698. CHANGE MANAGEMENT. Change should be communicated clearly to user base.
Selector methods are named in the singular:
These accord with IterationAgent method names:
Selector.by_leaves()
appears to be a small oversight and might better be changed toSelector.by_leaf()
to harmonize withIterationAgent.by_leaf()
and the other existing methods.The text was updated successfully, but these errors were encountered: