-
Notifications
You must be signed in to change notification settings - Fork 39
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
Support for_option
in the protocols macros
#331
Comments
thank you for your request. I'm rather hesitant to put further complexity into
Is this an actual requirement of yours or are you just looking to contribute? To your questions:
There's probably no good reason for this. I wanted some syntax sugar and be able to write my "protocols" as almost linear code. But one could have easily implemented this in a functional way as way and come out with a similarly ok-ish looking interface.
That would be the easiest, sure. I think I'd just re-use the You have something like this in mind, right?
|
This is indeed a requirement I have in a project. But to do so I just created a custom protocol in charge of binding once a cookie. And then use the regular flow to bind the second one. My worry is as the protocol API is not documented it can be interpreted as a private API. And so might change in future version of the library. I would also be happy to participate in the project but to be able to do so I will need to understand some of the choices made first.
Ok clear I'll try to think about it and come with a proposition that could keep the current protocols syntaxe but providing additional features
At first I was thinking the same, but then I though what if the user wants to use the complete opts argument along one. If we destructure inside the same name then it will not be possible. (
Yes something similar |
I don't intend to make it public as I don't consider it "essential" and it's not really polished either. That said, it's also unlikely that the protocol "virtual machine" is going to change anytime soon.
OK, please do an |
Planning to work on this at the end of the week. Hope I can sort it out during the WE |
Description of the feature
At the moment it is not possible to create operations you want to repeat in the protocols.
This could be handy for implementing
set_cookies
option to be able to set multiple cookie on the printing session.Example:
Implementation consideration
To be able to implement such a feature I am questioning myself on the following points:
:set_cookies_acc
as the concatenation onset_cookies
andacc
as the extension.)Also for the moment all the protocols system is not documented. Will it be part of a next iteration? (I am thinking it could be nice to make it part of a separated library)
The text was updated successfully, but these errors were encountered: