> On Sep 2, 2015, at 4:06 PM, Robby Findler <ro...@eecs.northwestern.edu> wrote:
> 
> I was worrying because the internal representation may change (again) so 
> exposing the real constructor doesn't seem wise. But making a printer print 
> what you want (or using selectors to check if it comes to that) seems okay. 

But it’s already exposed….(and documented).

John

> 
> Robby 
> 
> On Wednesday, September 2, 2015, 'John Clements' via Racket Users 
> <racket-users@googlegroups.com> wrote:
> 
> > On Sep 2, 2015, at 3:59 PM, Robby Findler <ro...@eecs.northwestern.edu> 
> > wrote:
> >
> > It makes sense to me to make a printer that uses URL->string.
> 
> Actually, I kind of don’t want that...
> 
> Here’s my use case:
> 
> I have a url string, "http://localhost:8086/query?db=mydb”. I want to add 
> more query parameters to it. Rather than fussing with the string syntax, I’d 
> like to just formulate the whole thing as a url, as in
> 
> (make-url “http” “localhost” 8086 “/query” ‘((db “mydb”)))
> 
> … but I’m not sure which ones should be byte strings, or whether the initial 
> slash appears in the path, or whether the query components are an association 
> list, etc.
> 
> This is exactly the kind of thing that I would see easily if I could just 
> write
> 
> (string->url "http://localhost:8086/query?db=mydb”)
> 
> … and see something like
> 
> (url “http” etc. etc.)
> 
> If it gets converted back to a string, I’m back to square one.
> 
> Does this make sense?
> 
> John
> 
> 
> 
> >
> > On Wednesday, September 2, 2015, 'John Clements' via Racket Users 
> > <racket-users@googlegroups.com> wrote:
> > It appears to me that the #<url> structure (as e.g. from net/url) is 
> > opaque. Is there any good reason for this? It’s kind of a pain (the default 
> > printer doesn’t show me the fields), and I don’t see any good reason for 
> > it, especially given the existence of url->string. I’d be happy to 
> > formulate this as a pull request...
> >
> > John Clements
> >
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to racket-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to