carp.core-kotlin
carp.core-kotlin copied to clipboard
Expose request object names as infrastructure helper
Application services have a matching request object for each possible request.
For logging and tracing, it is a common scenario names for these need to be printed. It is possible to statically link and infer these names from concrete classes in Kotlin.
However, this syntax is lengthy, and furthermore, not polymorphic. If we expose a name property on all request objects (optionally with formatting options, e.g., camelCase, underscore, plain spaces) this gives again an extra opportunity to handle requests in a uniform way where possible, increasing code reuse.
@ltj What are the specific requirements for you in terms of naming? I noticed you used underscores, is this a hard requirement, or you would be okay with applying your own converter functions (e.g., in case CARP core exposes names with spaces)?