Boost logo

Boost :

Subject: Re: [boost] [xint] Boost.XInt formal review
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2011-03-07 21:39:38


On Sun, Mar 6, 2011 at 16:25, Chad Nelson <chad.thecomfychair_at_[hidden]> wrote:
>
> If anyone else is reading this, please weigh in: do you prefer the
> current placement of these functions as static members, or moving them
> to free functions? The sole difference is a slight change in the syntax
> used to call them, they'd be equally efficient either way.
>

"Guideline: Where possible, prefer writing functions as nonmember nonfriends."
~ http://www.gotw.ca/gotw/084.htm

Another way of looking at it: The more (interesting) functions you can
implement as nonmember nonfriends, the harder it is for people to
claim that they can't implement their own pet function with the
interface you provided.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk