Go to the FreeLists Home Page Home Signup Help Login
 



[haiku-development] || [Date Prev] [03-2008 Date Index] [Date Next] || [Thread Prev] [03-2008 Thread Index] [Thread Next]

[haiku-development] Re: coding style

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 03 Mar 2008 14:27:33 +0100
On 2008-03-03 at 12:32:41 [+0100], Bruno Albuquerque <bga@xxxxxxxxxxxxx> 
wrote:
> Marcus Overhagen wrote:
> 
> >> * use "char* variable" instead of "char *variable" in C++ code
> > 
> > I disagree with that one. The * belongs to the variable, not to the 
> > type.
> 
> I wonder why. When I see something like this:
> 
> char* foo;
> 
> I read that foo is a pointer to a char (foo's type is "char pointer"). 
> For me, moving * to be next to the variable name does not make much sense.

Exactly. The * does not belong to the variable, otherwise you would have to 
keep typing "*variable" instead of just "variable". How is it not part of 
the type itself?

Best regards,
-Stephan





[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.