3 ms·
How about this: typedef int annotated_type; void foo (annotated_type parameter_name) {} then I could write this: foo (5); /* the short and alegedly amb
by userulluipeste 12y ago
How about this:
typedef int annotated_type;
void foo (annotated_type parameter_name) {}
then I could write this:
foo (5); /* the short and alegedly ambiguous version of function calling */
or this:
foo ((annotated_type) 5); /* now I know more about what "5" means
in this function parameter's context */
There could be a lot of annotated types around, and their presence would be optional, so the code could be cluttered for the sake of making things more explicit only where it would be really needed!
Of course, this doesn't come with parameter-order juggling, but that is another can of worms in itself, which I'd better avoid!