On Thu, Jul 4, 2019 at 4:21 PM Alexander Aring <ar...@mojatatu.com> wrote:
> why you just use eval() as pattern matching operation and let the user > define how to declare a matching mechanism instead you introduce another > static matching scheme based on a json description? > > Whereas in eval() you could directly use the python bool expression > parser to make whatever you want. > > I don't know, I see at some points you will hit limitations what you can > express with this matchFOO and we need to introduce another matchBAR, > whereas in providing the code it should be no problem expression > anything. If you want smaller shortcuts writing matching patterns you > can implement them and using in your eval() operation. Regarding hitting limitations: quite possibly, yes. Using eval() to provide code for matching is going to put more of a dependency on the test writer knowing Python. I know it's not a terribly difficult language to pick up, but it's still setting a higher barrier to entry. This is the primary reason I scrapped the work I had presented at Netdev 1.2 in Tokyo, where all the tests were coded using Python's unittest framework - I want to be sure it's as easy as possible for people to use tdc and write tests for it. Unless I'm off-base here? Lucas