Last active
December 24, 2015 14:19
-
-
Save hyrmn/6811429 to your computer and use it in GitHub Desktop.
A modest proposal for routing in Nancy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Now, there are instances where you don't actually care about parameters passed in. A GET route to an about page for example. | |
// The normal route might look like: | |
Get["/"] = parameters => View["about"]; | |
// However, since parameters are not used, the convention is to use an underscore: | |
Get["/"] = _ => View["about"]; | |
// That works, but, frankly, it's a little hard to read and gets lost in the shuffle. | |
// So, instead, I'd like to propose the following: | |
Get["/"] = ಠʃಠ => View["about"]; | |
// He's kind of a look of disapproval meets Kilroy. | |
// You can even give him a lot more facial definition and make him that much more awesome: | |
Get["/"] = (ಠʃಠ) => View["about"]; | |
// I'm not sure this little guy is easily typeable, but he could be macro-ed. And, lets face it, great art is worth it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment