Get the latest tech news
Pantheon: Parsing command line arguments
Note: In the example we introduced a borrowed string, the goal is to be able to borrow from the arguments. After managing free memory I wanted to implement another feature, but it launched me into a very long yak shave.
In order to choose how fields map to arguments we will need to introduce some attributes, but we will talk more about that when we describe the derive macro itself. Both those crates are pretty complicated, so we won't be redeveloping a clone from scratch, we are going to write some ad-hoc code that will not be as robust. Well, we still need to maintain a depth counter, due to possible generic parameters that could introduce commas that don't mean the end of the field's type.
Or read this on Hacker News