-
Notifications
You must be signed in to change notification settings - Fork 221
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
Add Paths #771
Add Paths #771
Conversation
Codecov Report
@@ Coverage Diff @@
## master #771 +/- ##
==========================================
+ Coverage 81.51% 82.46% +0.95%
==========================================
Files 37 38 +1
Lines 649 650 +1
Branches 22 22
==========================================
+ Hits 529 536 +7
+ Misses 120 114 -6
Continue to review full report at Codecov.
|
I like bullet points 2-4 and am all in favor of having those. I see all the benefits of having
If we go this route, I'm happy to run through the documentation and make that change. |
Thanks @rpless! I think that sounds reasonable. I'm happy to un-deprecate Just to add some more color on why I think it makes sense to get rid of What really concerns me today is that I agree it's slightly more verbose, but I personally think the clarity it brings in is a good enough reason to trade-off a couple of more characters in the source code. |
Yeah I understand the concerns about ambiguity, which is why I suggest documenting I'd be curious to hear feedback from others and from people using it when this rolls out, but if the general consensus is that |
So this is pretty much ready to go alive. The only thing I decided to keep for now is removing named path extractors, eg As a compromise, I can bring |
I propose we restructure our "path matching" and "path extracting endpoints" around the
DecodePath[A]
type-class that has been available for quite a while already (as an extension point for matching/extracting arbitrary types).Here is the changes:
path[A]
method that's intended to be a replacement forstring
,int
, etc.path("foo")
method that makes it easier to convert arbitrary strings into matching endpoints (we could only use implicit conversion before).Bodies
, there is nowPaths
that embeds all of the path-based endpoints.I'd like to solicit some feedback on that given it's an API change. I understand
path[Int]
is way more verbose thanint
, but I really admire how explicit and extensible it is.