Boost logo

Boost :

Subject: Re: [boost] Review Request: Creasing (Sequence Properties)
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-01-27 08:43:45


Joachim Faulhaber wrote:
> 2010/1/24 Grant Erickson <gerickson_at_[hidden]>:
>
> > The creasing algorithm templates define four template functions for
> > determining the order properties of sequences, specifically:
> >
> > * Increasing
> > * Decreasing
> > * Strictly Increasing
> > * Strictly Decreasing
>
> in your implementation of 'creasing' you provide the four specific
> algorithms is_[strictly_]{in_,de_}creasing while hiding the general
> algorithm is_creasing in namespace detail.
>
> I'd suggest to implement only the latter. This would make your
> extension both more minimal and more general.

I'd suggest keeping the original function templates but promote is_creasing to first class status. That doesn't fit your "more minimal" criteria, but retains usability for some common cases while retaining full generality.

> Although 'creasing' undoubtedly is a very enjoyable word it violates
> the principle of least astonishment. So I'd prefer 'ordered'.

"creasing" was backformed from "increasing" and "decreasing" and was cute on that basis, but as "creasing" is a word with an unrelated meaning, it certainly won't work for something that isn't an implementation detail. I think "ordered" works nicely.

_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.


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