2 ms·
Indeed, and that's not what the blog post's router code does.
by skrebbel 12y ago
Indeed, and that's not what the blog post's router code does.
- MCRed 12y agoIt 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.