3,388 votesPer Øyvind commented
I support this idea, since this will help with compile time checking of constructor arguments.
One example of where this could be useful is for any algorithms that would require a Keyed hash algorithm where the point of the algorithm would be to initialize with a password.
To make it less cluttered, and to pass the meaning, one should at least allow naming of the parameters or add a way to require implementers of a specific class or interface to provide a constructor with said arguments. and to only allow referencing the empty constructor or one of the required constructors.
6 votesPer Øyvind shared this idea ·