kalekundert / byoc

MIT License
0 stars 0 forks source link

Always invoke `param(cast=...)` #22

Closed kalekundert closed 2 years ago

kalekundert commented 3 years ago

Currently, the cast function provided to appcli.param() is only invoked if the getter does not have it's own cast function. In other words, it serves as the default cast function, and the default can be overridden.

However, I realized that it may be more intuitive to think of this cast function as something that should be applied on all getters, in addition (and after) to any getter-specific cast functions.

The specific problem I had was:

The drawback with this is that it becomes impossible to override the param-level cast function. I'm not quite sure if that's a good or bad thing.