tucker@dooma.prl.philips.nl (Mark Tucker) (10/20/89)
A Proposed Extension to C++: Inline Typedefs in C++
THE PROBLEM:
You often cannot express complex types in C++ without resorting to
typedef statements. This is inconvenient for simple types such as a
function from void * to void *. Requiring me to define things like
:+
#typedef void *(FunctionPointerToPointer)(void *);
#typedef int (*FunctionAnyToInt)(...);
#typedef int (*FunctionStringAnyToInt)(char *,...);
:-
imposes the overhead on the reader of understanding an unnecessary and
rather boring naming convention.
THE SOLUTION:
Introduce a new keyword \t{inlinetypedef}. It goes in inline
type-expressions in exactly the same place that the defined identifier
goes in typedef expressions:
:+
Point *centerOf(Shape *shape);
FunctionPointerToPointer f = ((void *(inlinetypedef)(void *))) centerOf;
:-
Mark Tucker Phone: +31-40-743137
Philips Research Laboratories WB339 Email: mcvax!dooma!tucker
P.O. Box 80.000
5600 JA Eindhoven -- The Netherlands
Mark Tucker Phone: +31-40-743137
Philips Research Laboratories WB339 Email: mcvax!dooma!tucker
P.O. Box 80.000
5600 JA Eindhoven -- The Netherlands