However, I did see a lot of value in the array_of macro as a means of defining an array of anonymous strictly typed objects. Before you had to do this as an array of a named tuple type, but this had some downsides. Mainly that you are unable to define defaults for the property. As such in order to make a key optional, it had to be nilable.
Add array_of macro to ADI::Extension::Schema
Remove property?
Refactors EXTENSION_SCHEMA_PROPERTIES_MAP to not use TypeDeclaration directly
Follow up to https://github.com/athena-framework/athena/issues/332#issuecomment-1933299250, I thought about it and realized there's not much benefit in having the dedicated type macros, just to try and construct the type that you could otherwise get directly off the
TypeDeclaration
.However, I did see a lot of value in the
array_of
macro as a means of defining an array of anonymous strictly typed objects. Before you had to do this as an array of a named tuple type, but this had some downsides. Mainly that you are unable to define defaults for the property. As such in order to make a key optional, it had to be nilable.array_of
macro toADI::Extension::Schema
property?
EXTENSION_SCHEMA_PROPERTIES_MAP
to not useTypeDeclaration
directly