Closed picca closed 3 years ago
You can use typedef
s to give meanings to the parameters:
typedef double Width;
typedef double Height;
datatype(
MyType,
(C1, Width, Height, ...)
);
Indeed I could implement named parameters in the library itself, but it would complicate the design, so I stick to only unnamed parameters for now.
elegant, like your avatar :))
Hello,
I use datatype99 in one of my library, like this
you get the idea :).
In normal struct you give a name to the parameter, this way it is easy to identify the meaning of each parameter. I can indeeed add after each Constructor a comment describing each parameter. Now my question ism is it possible to give a name to these parameters or embed a comment directly in the definition of the type.
or thomething like this.
thanks for your advices.
Cheers
Frederic