Open jorgensd opened 2 years ago
A number of the zero-argument property functions currently do some computation to cache expensive results, so it might be worthwhile considering functools.cached_property
too.
I'm fine with using functools.cached_property
as well. I figured a proposal such as this would break quite a lot of code in both DOLFINx and Firedrake, but as long as you, @dham , @garth-wells etc. are happy with this being introduced, Im happy to give it a go over a weekend.
It would be good to create a release/tag with a last working version before proceeding with large changes.
I'm in favour of backward-incompatible API improvements in UFL. However I'd rather they came in a limited number of batches, rather than a constant dribble. Users should understand us changing our API for the better, but their appetite for repeatedly changing their code will be limited.
It would be good to create a release/tag with a last working version before proceeding with large changes.
The latest version working with DOLFIN (bitbucket) is https://github.com/FEniCS/ufl/commit/1de7f12a2677a3a0c48cf0acd45e43a13de93b28 (or maybe https://github.com/FEniCS/ufl/commit/7a4303fb5d7253e39f9e67ae8da176a11c3c275f) The changes introduced in https://github.com/FEniCS/ufl/pull/77 breaks old ffc as noted in https://github.com/FEniCS/ufl/pull/77#issuecomment-1009769792
I think we should start using property decorators, as it would make alot of the code more readable.