The fact that default is a value makes it static. In some cases, like generating random values and incrementing IDs, it would be practical to customize default so that it can return a different value for a given factory function (I guess it could even be the default behavior, but it's not my issue here).
This can be worked around by creating factory functions manually but I think this defeats the purpose of this PPX.
So, would it make sense to be able to define default as function?
The fact that
default
is a value makes it static. In some cases, like generating random values and incrementing IDs, it would be practical to customizedefault
so that it can return a different value for a given factory function (I guess it could even be the default behavior, but it's not my issue here).This can be worked around by creating factory functions manually but I think this defeats the purpose of this PPX.
So, would it make sense to be able to define
default
as function?