I had originally planned to put both of these into the Element superclass, make the former generic and inherited, and stub out the latter as an abstract function. I can't do this because they're static, but they need to be in order to be used to create the objects.
Finding no direct solution to this problem, having a bit of a time sensitivity, and given that it's not a functional issue at this point (code base is small, it's easy to infer, and unlikely to need revision), it stands as an ugly part of a codebase I'm otherwise pretty proud of.
I'd love some help with a solution to this while I work on other things, else I'll just come back to it.
all Element subclasses currently contain nearly identical factor functions...
and different implementations of the same helper
I had originally planned to put both of these into the
Element
superclass, make the former generic and inherited, and stub out the latter as an abstract function. I can't do this because they're static, but they need to be in order to be used to create the objects.Finding no direct solution to this problem, having a bit of a time sensitivity, and given that it's not a functional issue at this point (code base is small, it's easy to infer, and unlikely to need revision), it stands as an ugly part of a codebase I'm otherwise pretty proud of.
I'd love some help with a solution to this while I work on other things, else I'll just come back to it.