Xref: utzoo comp.lang.c++:5144 comp.windows.x:14440 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!phigate!prle!prles2!dooma!tucker From: tucker@dooma.prl.philips.nl (Mark Tucker) Newsgroups: comp.lang.c++,comp.windows.x Subject: A Proposed Extension to C++: Inline Typedefs in C++ Summary: (void *(inlinetypedef)(void *)) Message-ID: <748@prles2.UUCP> Date: 20 Oct 89 10:23:15 GMT Sender: nobody@prles2.UUCP Reply-To: tucker@dooma.prl.philips.nl (Mark Tucker) Organization: Philips Research Labs Eindhoven Lines: 41 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