I liked the solution of having get_value be @generated, but now due to EmulationModel details, instead of straight :(return getfield(store, $field)[$K(T, U)]), we have :(return get_data_field(store, Val($field))[$K(T, U)]) so downstream packages can override it. I suspect that messes with the @generated-ness. Also, Val(foo) is sometimes surprisingly expensive.
Look into the pre-compilation/performance impacts of this and decide if it's worthwhile (and feasible) to come up with something better.
I liked the solution of having
get_valuebe@generated, but now due toEmulationModeldetails, instead of straight:(return getfield(store, $field)[$K(T, U)]), we have:(return get_data_field(store, Val($field))[$K(T, U)])so downstream packages can override it. I suspect that messes with the@generated-ness. Also,Val(foo)is sometimes surprisingly expensive.Look into the pre-compilation/performance impacts of this and decide if it's worthwhile (and feasible) to come up with something better.