I was a big fan of
Mono.GetOptions
when I first saw it, having included in in Searcharoo.net back in 2007. Now I discover that Miguel isnot a fan of using attributes for command line options. Attributes are just a poor language for expressing complicated semantics, they can only do well for setting simple flags, but once that is over, they become just as bad as the System.Shell.CommandLine interface...We tried that before, that was called "Mono.GetOptions" and we obsoleted it a few years ago, it was a cute idea, but did not map well for real world use.I guess I better check out Mono.Options. Here's my
GetOptions
implementation for posterity (I thought the attributes were kinda cool, and more readable/maintainable than any other alternative at the time...)Elsewhere on my reading list, Bart simultaneously posted an alternative opinion - some detailed examples of the .NET 4.0 code to help people understand it (not sure if he was aware it might not make RTM).
I enjoyed both perspectives, although tended to agree with Miguel's position - that it belonged on CodePlex rather than in the Framework. Was interesting to see his later update indicating that is exactly what would actually happen.
Bit OT for a blog post... but interesting to see the next release growing & changing
No comments:
Post a Comment
Note: only a member of this blog may post a comment.