What is the other option here? It seemed like with the OO/Julia way you are complaining about you at least have working (but slow) code handling your new polynomial type. In a case where your new type doesn't work with "obtainCoefficient", it won't work with any of your other code either. You would just have no working code with your new polynomial type. How is that better?
But the next week, someone asks whether you can handle polynomials > specified as p(x)=det(A-x*B), where A and B are n-by-n matrices. For > polynomials in this format, "obtainCoefficient" is expensive and would not > be regarded as a simple "getter" operation. If many people had already > written functions invoking the 'obtainCoefficient' method, then you would > be stuck. You would retrospectively realize that the obtainCoefficient > member function was not a good idea. This example is typical of open-ended > scientific software projects. > >> >>