I liked the idea of that parser so I threw together an even better Nim version: 
[https://play.nim-lang.org/#ix=2ogb](https://play.nim-lang.org/#ix=2ogb). It 
parses the format on compile-time and creates a parser that returns a tuple 
with all the arguments. So now all the arguments have the correct type, and on 
runtime it's just a simple tuple access instead of looking through a bunch of 
hash tables for single character arguments. This is what I'd expect to find in 
a Nim codebase (although tidied up a bit, this is just something I threw 
together).

Reply via email to