2 ms·
It is in fact what is done with the blog post's router code. Phoenix gives a high level DSL for routes, which is created using macros that result in a pattern
by MCRed 12y ago
It is in fact what is done with the blog post's router code.
Phoenix gives a high level DSL for routes, which is created using macros that result in a pattern match: exactly the alternative suggested.
For example:
http://slides.com/chrismccord/rise-of-the-phoenix#/7 http://slides.com/chrismccord/rise-of-the-phoenix#/7
Thus you get the convenience of writing routes the way you want, and the resulting code has the speed of pattern matching.