Boost logo

Boost :

Subject: Re: [boost] [concept] why is `requires` plural?
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2010-05-27 11:01:22


On Thu, 27 May 2010 09:52:41 -0400, Lorenzo Caminiti
<lorcaminiti_at_[hidden]> wrote:
> I was thinking: What about `throw` for exception specifications?
> Shouldn't that also be `throws` (3rd person) because it is declaring
> the exceptions that the function can throw?

In theory, yes. In fact, they did it that way in Java, just as they use
the 3rd person keywords "extends" and "implements".
In practice, you would meet a lot of resistance if you tried to introduce
two keywords as similar as "throw" and "throws" into C++, when they can
never even appear in the same place.

> Also I looked at all C++/C++0x keywords and I couldn't find any other
> 3rd person keyword... would `requires` eventually be the only one?

There are no other keywords with a purpose comparable to "requires".

Sebastian


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