This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++ "with" keyword


> ... and potentially two new variables in your code and binary.
> what i wanted to have:
> 
>  
>              {
>                #define y long_descriptive_expression_I_dont_like_repeating;
>                #define z long_descriptive_expression_I_dont_like_repeating;
>  
>                  z.memberA = z.memberB;
>                  z.memberB = y.memberA;
>                #undef z
>                #undef y
>              }
>  
> but this is just ugly. 

Saying something is ugly is not an argument. It is the absence of a useful
argument. What are you suggesting we do, take a vote to find out which
form more people find ugly?

(hint: you will probably lose, most C++ programmers will be quite familiar
with the construct above, but will find the proposed WITH unfamiliar and
thus ugly).

As for two new variables. One would hope not, a stupid compiler might do
that, but then a stupid compiler might generate junk copies to implement
WITH. You really can't base arguments on fantasies about what stupid
compilers might or might not do.

In short, you have given no technical arguments to prefer your new form
over the familiar existing technique.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]