[TUHS] v7 K&R C

Warner Losh imp at bsdimp.com
Thu May 14 14:40:51 AEST 2020


On Wed, May 13, 2020, 10:22 PM Greg A. Woods <woods at robohack.ca> wrote:

> At Thu, 14 May 2020 09:36:57 +1000 (EST), Dave Horsfall <dave at horsfall.org>
> wrote:
> Subject: Re: [TUHS] v7 K&R C
> >
> > On Tue, 12 May 2020, Paul Winalski wrote:
> >
> > > o operator overloading
> >
> > [...]
> >
> > I never could figure out why Stroustrup implemented that "feature";
> > let's see, this operator usually means this, except when you use it in
> > that situation in which case it means something else.  Now, try
> > debugging that.
>
> Well in the true OO world the ability to "overload" a message (aka what
> is sometimes effectively an operator) allows a wise designer to apply
> the traditional meaning of that message (operator) to a new kind of
> object.  Attempts to change the meaning of a message (operator) when
> applied to already well known objects is forbidden by good taste and
> sane reviewers.
>
> C++ being a bit of a dog's breakfast seems to have given some people the
> idea that they can get away with abusing operator overloading for what
> can only amount to obfuscation.
>

Queue rant about << and >> overloading...

Warner

--
>                                         Greg A. Woods <gwoods at acm.org>
>
> Kelowna, BC     +1 250 762-7675           RoboHack <woods at robohack.ca>
> Planix, Inc. <woods at planix.com>     Avoncote Farms <woods at avoncote.ca>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20200513/2e8dabca/attachment.htm>


More information about the TUHS mailing list