Thread:User talk:CodeCat/pt-verb/conj/reply (4)

Agreed, the table generation code is not straightforward, but there are a few conditionals in there. It also combines the functionality of both and. As for the data-based approach, it is obviously not as powerful and elegant as a generative approach but simple to implement and understand.

My goal was to create a drop-in replacement for the current inflection code which would produce exactly the same output, with better performance and maintainability.

Once that is in place we can look at ways to replace the data with generators, I think had some ideas for that already. I'm a fan of doing refactorings step-by-step and not in one big swoop.