 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Bo Persson Guest
|
Posted: Mon Apr 26, 2004 1:53 am Post subject: N1647 - Naming of xor_combine members |
|
|
I have a problem with names like base1_type and base2_type. Why choose
names that are almost identical?
In std::pair we have first_type and second_type. In std::unary_function
we have first_argument_type and second_argument_type.
Isn't that precedence enough to choose names like first_base_type and
second_base_type here?
Bo Persson
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
Michiel Salters Guest
|
Posted: Mon Apr 26, 2004 4:59 pm Post subject: Re: N1647 - Naming of xor_combine members |
|
|
[email]bop (AT) gmb (DOT) dk[/email] ("Bo Persson") wrote in message news:<c6h3hc$bitkr$1 (AT) ID-206811 (DOT) news.uni-berlin.de>...
| Quote: | I have a problem with names like base1_type and base2_type. Why choose
names that are almost identical?
In std::pair we have first_type and second_type. In std::unary_function
we have first_argument_type and second_argument_type.
|
I think it's binary_function that has a second_argument_type :-)
| Quote: | Isn't that precedence enough to choose names like first_base_type and
second_base_type here?
|
Of course, it's bind1st and bind2nd, not bind_first and bind_second,
But these names don't refer to types, so I think you have a valid
point. Consistent naming is a lot of work, but it "looks" better.
In fact, I'd say that base1_type might very well be named
first_argument_type. xor_combine definitely is a binary meta
function and therefore its two arguments are types. It makes sense
to name these arguments first_argument_type and second_argument_type.
Regards,
Michiel Salters
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|