const/immutable member functions

so so at so.do
Mon Jan 24 15:41:55 PST 2011


> C++ style aka Yoda style:
> 1. public double func(int input) const;
> 2. const double func(int input);
> 3. const double func(int input) const;
>
> VS.
> hypothetical left-to-right style:
> 1. public const func (int input) -> (double);
> 2.  func (int input) -> (const double);
> 3. const func (int input) -> (const double);
>
> Which ordering makes for a more natural read?

For you or for me? :)


More information about the Digitalmars-d mailing list