On Monday, April 4, 2016 at 3:39:13 PM UTC-4, Matt Jadud wrote: > Hi Brian, > > > This looks similar to what "dispatch" does? > > > https://docs.racket-lang.org/web-server/dispatch.html > > > > I've never extended the bi-directional patterns that are available, but there > is an extension mechanism built in, so that your #:when notions might be part > of an extended/new url component matcher? > > > Cheers, > M
They both have a similar role, but I think there are significant differences (unless I'm misunderstanding): * It's not uncommon to rearrange the components of a URL pattern. Without name binding, you would need to change both the pattern and the handler function. * Typing is optional for mine * I didn't see a way to define further constraints (besides the type of an argument) i.e. ensuring an argument matches a pattern I thought about not providing the #:name parameter, and that might be possible. Rails provides name_url() and name)_path() functions for absolute and relative url creation - I'll have to weigh the pros/cons of using the name of the handler function as the prefix for those. -- 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.