cats-uri #5930
Replies: 2 comments 4 replies
-
With regards to the current implementation, I think that it's the entity model used to describe a Uri.Path that is fundamentally broken. I'm probably stating the obvious, and probably something that someone else has already written/said, but what looks broken to me is the fact that currently a |
Beta Was this translation helpful? Give feedback.
-
Having tried lemonlabs Uri in banana-rdf and using http4s URi I have some ideas of key elements to improve http4s Uri.
Further crazy requirements:
Having an excellent real URI class that encompasses both URNs and URLs would be very helpful when writing application code. On the web application code proceeds as follows:
If the code could use the same URI structure in the parsing stage as it uses in the fetching stage that would make for much nicer and smoother coding. Note in RDF URIs are the core of the naming scheme, so one is using them all the time for every data structure. In banana-rdf I added support for relative urls, as those are useful when fetching data and also when posting graphs to a container: the server decides on the URL of the created resource and so the graph sent has to be one that can contain relative Urls. Note there are other places where Urls turn up in HTTP4s
(see issue typelevel/cats-uri#6) PS. Relative URLs are simply versions of what is known in linguistics and philosophy of language as indexicals. They take part of their meaning from a context. That is when I use "you" speaking to someone in one context that can very well refer to someone else than when I use "you" in another context. Or if I give directions to a place starting from a position on a map, such as "go to the end of the road, turn right and walk 100m", that is going to lead someone following the process to different places if the starting point is changed. Logic prefers absolute URLs, as it allows one to avoid name clashes, but pragmatics requires relative ones, and HTTP is in the area of pragmatics. (I wrote quite a lot about this, pragmatics and the web in my second year Phd report.) |
Beta Was this translation helpful? Give feedback.
-
@isomarcte has taken an interest in rebooting cats-uri. This could potentially replace ours in 1.0. @hamnis and @aeons in particular have done work on ours in the past and may be interested in it.
Beta Was this translation helpful? Give feedback.
All reactions