Boost logo

Boost :

Subject: Re: [boost] [contract] Mixin Boost.Contract and Boost.STM
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-03-21 16:06:39


----- Original Message -----
From: "Lorenzo Caminiti" <lorcaminiti_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Sunday, March 21, 2010 6:01 PM
Subject: Re: [boost] [contract] Mixin Boost.Contract and Boost.STM

Hi Vicente,

>> You have no comented my suggestion to don't duplicate the signature. Instead of letting the C++ signature, generate it from the macro, so
>>
>> void push_back(const T& element)
>> CONTRACT_FUNCTION( (inherit)(pushable<T>) // No class type.
>> (public) (void) (push_back)( (const T&)(element) )
>>
>> will become
>>
>> // NO NEED OF THE C++ SIGNATURE
>> // void push_back(const T& element)
>> CONTRACT_FUNCTION( (inherit)(pushable<T>) // No class type.
>> (public) (void) (push_back)( (const T&)(element) )
>>
>
> Hi, please could you comment my suggestion?

This is possible (I will have to extend the signature-sequence just a
bit to include default argument values, exception specifications,
member list initializations, and absolutely anything else you can
program in a C++ function declaration -- but most of the declaration
tokens are already there).

There is a question of what syntax is more readable vs. which syntax
requires more programmers' coding work. I have asked this question to
all Boosters -- see separate email thread.

Thanks,
Lorenzo
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

I see the probelems this could introduce. I think howver thatn we should try to provide interfaces that don't impose the user to repeat redundant information.

Vicente


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