[nem-en] [RFC] qualified variant options

Ricardo Fernández Pascual r.fernandez at ditec.um.es
Fri Sep 24 11:03:37 CEST 2004


El vie, 24-09-2004 a las 10:46, Michal Moskal escribió:
> Hi,
> 
> We would like to request yours comments on the following issue.
> Now variant options are in the same scope as the enclosing variant,
> i.e.:
> 
> variant A { | B | C }
> 
> defines A, B and C. We consider the change, so it would define A, A.B
> and A.C.
> 
> + it would unify variants with enums more
> + it would be possible to drop E_, T_ and similar prefixes, vs longer
> and more readable type names
> - it will need extra keystrokes
> - it breaks compatibility
> 
> Anyway we would like to know what people think about it?

I would like this very much, specially because of reason number two. 

About the first problem, currently you have to manually mangle the name
anyway, so it would not be too much worse. And, with the new scheme, you
could use "using A" (or something similar) to import the names in the
namespace.

> This change is going to be in 0.3 (December?), if it's going to be
> finialized at all.


-- 
Ricardo Fernández Pascual
r.fernandez at ditec.um.es
Murcia. España.






More information about the devel-en mailing list