S
Stefan Ram
The determination of a designation by argument types seems to
be a common design principle in Java. Still, it is not
implemented for type parameters. For example:
class parametrizedAction< S >{ void of( S s ); }
class parametrizedAction< S, T >{ void of( S s, T t ); }
This is not allowed - one needs to find another name for the
second class.
But here it, would make sense to me to have an action
parametrized by either one or two arguments and a compiler
should be able to figure out which use is intended by the
number of the type arguments.
be a common design principle in Java. Still, it is not
implemented for type parameters. For example:
class parametrizedAction< S >{ void of( S s ); }
class parametrizedAction< S, T >{ void of( S s, T t ); }
This is not allowed - one needs to find another name for the
second class.
But here it, would make sense to me to have an action
parametrized by either one or two arguments and a compiler
should be able to figure out which use is intended by the
number of the type arguments.