Boost logo

Boost :

Subject: Re: [boost] [contract] toward N3351 concepts
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2012-10-08 19:03:09


On Mon, Oct 8, 2012 at 1:32 PM, Evgeny Panasyuk
<evgeny.panasyuk_at_[hidden]> wrote:
> 08.10.2012 23:40, Lorenzo Caminiti wrote:
>>
>> IMO, this is a rather weak motivation to support axioms especially in
>> the core language (just the syntax check of some code that could
>> otherwise and almost equivalently be written using code comments) but
>> it seems to be the only sensible thing to do with axioms.
>
>
> I hope C++ Axioms are not about any kind of checking, otherwise some other
> name should be chosen.
> Axioms are:
> 1) Formal and clear language to talk about semantics.

I disagree, I think it'd be great if compilers could check the
semantics of programs (I know it's impossible, but it'd be great). So
given that axioms state the semantics of concepts and that I'd like to
the compiler to check the semantics of programs, I'd like the compiler
to check the axioms (but again, unfortunately I understand that it
cannot be done).

> Formal, small and
> clear language, which may became standard for C++ developers is much better
> than comments.
> 2) That language is understandable by compiler. Possible use cases:
> a) Overload resolution based on semantic properties
> b) Optimizability - very strong side of C++ may become even stronger.
> However, rules regarding which kind of optimizations compiler allowed to do
> with axioms, should be well-defined. Personally, I'd trade lambdas, for
> well-defined axiom/semantic-based optimizations allowed by ISO.

--Lorenzo


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