On Sun, 06 Dec 2009 23:43:16 -0600, Andrei Alexandrescu <seewebsiteforem...@erdani.org> wrote:
>Walter Bright wrote: >> Andrei Alexandrescu wrote: >>> Not wanting to start a language war, but to just say C has plenty of >>> design holes and then patronize it with the comment that designing >>> languages is hard - well, you better have a hell of an argument up >>> your sleeve. >> >> C really has only one major design flaw - the conflation of arrays and >> pointers. > >Great insight. > >Andrei I think the following real-world code is a good argument against comma operators: template <typename T> Q_INLINE_TEMPLATE void QList<T>::node_destruct(Node *from, Node *to) { if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) while(from != to) --to, delete reinterpret_cast<T*>(to->v); else if (QTypeInfo<T>::isComplex) while (from != to) --to, reinterpret_cast<T*>(to)->~T(); }