passing POD by value with const qualifiers. Silly or not?
André Wöbbeking
Woebbeking at kde.org
Sat Feb 23 09:18:32 GMT 2008
On Friday 22 February 2008, Stefan Teleman wrote:
> On Fri, Feb 22, 2008 at 3:33 PM, André Wöbbeking <Woebbeking at kde.org>
wrote:
> > On Friday 22 February 2008, Stefan Teleman wrote:
> > > On Fri, Feb 22, 2008 at 3:16 PM, Ariya Hidayat <ariya at kde.org>
wrote:
> > > > > And if you change it (intentionally or not), what happens ?
> > > > > Anything ?
> > > >
> > > > You can't. It will give a compile error.
> > >
> > > Yes, i know. And not only it's orthogonal to this thread, but it
> > > begs a more fundamental question: why would anyone ever try to
> > > modify a function argument passed by value.
> >
> > 1) by mistake
> > 2) too lazy to use another variable
>
> Are these "technical rationales" ? They sound like excuses to me.
That sounds a bit like "why using const at all" to me.
More information about the kde-core-devel
mailing list