I'm proposing we have an option (similar to Type.check) that disables currying.
If I define a type that requires 3 properties, and I mistakenly only pass in 2, I'd like a type error to occur instead of silently ignoring the problem (by creating a curried type constructor).
It also would mitigate the problem of #45 (hitting a maximum key limit when using curryN).
It would also allow us to get invalid type errors as soon as they are introduced instead of only doing checks at the point of execution.
I think it would be as simple as optionally replacing curry with an identity decorator that just returns the original function instead.
I'd also like to propose for removing curried constructors entirely and leaving that as a task for userland. But I realise that proposal would probably break existing code and be less popular.
I'm proposing we have an option (similar to Type.check) that disables currying.
If I define a type that requires 3 properties, and I mistakenly only pass in 2, I'd like a type error to occur instead of silently ignoring the problem (by creating a curried type constructor).
It also would mitigate the problem of #45 (hitting a maximum key limit when using curryN).
It would also allow us to get invalid type errors as soon as they are introduced instead of only doing checks at the point of execution.
I think it would be as simple as optionally replacing curry with an identity decorator that just returns the original function instead.
Something like:
Any thoughts / objections?
I'd also like to propose for removing curried constructors entirely and leaving that as a task for userland. But I realise that proposal would probably break existing code and be less popular.