C++ Stylistics
Rory McGuire
rmcguire at neonova.co.za
Mon Jul 19 01:58:40 PDT 2010
On Mon, 19 Jul 2010 10:52:51 +0200, Rory McGuire <rmcguire at neonova.co.za>
wrote:
> On Sun, 18 Jul 2010 23:21:14 +0200, BLS <windevguy at hotmail.de> wrote:
>
>> On 18/07/2010 11:42, Justin Johansson wrote:
>>> bearophile wrote:
>>>> A Google talk in 2008 by Kevlin Henney, "C++ Stylistics":
>>>> http://www.youtube.com/watch?v=zh8W4ZglOlw
>>>>
>>>> Some of the limits/problems of C++ he talks about are patched by Qt,
>>>> like signals & slots, Q_FLAGS, Q_PROPERTY, Q_ENUMS:
>>>> http://doc.trolltech.com/latest/moc.html
>>>> GUIs have needs quite different from the features offered by standard
>>>> C++: they don't need high speed processing, but they enjoy a good
>>>> runtime reflection and few other things, most of them offered in some
>>>> way by the Qt "Meta-Object Compiler".
>>>>
>>>> Bye,
>>>> bearophile
>>>
>>> You may have missed it but I raised the topic of Qt, it's signals
>>> and slots architecture and its meta object compiler, on this
>>> newsgroup about two months ago under the subject
>>>
>>> "Can D be cute (Qt)"
>>>
>>> http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=109832
>>>
>>>
>>> Cheers
>>> Justin Johansson
>>>
>>>
>>
>> I regret that this is such a silence discussion. In fact Lutger (sorry
>> don't know your full name) has implemented a fine QT like thread safe
>> Signal Slot library.
>>
>> // Q_FLAGS, Q_PROPERTY, Q_ENUMS and GUI
>> Finally this means > we need more _traits() power.
>>
>> --We have, afaik. no support for isProperty(), and to make
>> visual/interactive GUI development possible, isEvent() is also
>> necessary.
>
> Copied from http://digitalmars.com/d/2.0/phobos/std_traits.html
> isProperty can be implemented using:
>
> functionAttributes!(foo.func) & FunctionAttribute.PROPERTY
>
>
>
>
>
>>
>> -- Now that we know that Compile- to Run- time Reflection could be just
>> a mixin template away we have another good reason to ask for more
>> (meta) _traits power.
>>
>> --Uwe Salomon's Indigo library is also offering a lot of ideas in this
>> regard .. one thing I would name here is internationalization.
>>
>> --QT in D.... ?
>> D bindings to GUI APIs are already there, but wait ...
>>
>> /
>> I think the point is to give a pure *D2 QT implementation* a go, and
>> let's see WHERE the compiler/language is not good enough.
>>
>> Like Andrei did it for his std.algorithm.
>> /
>> Bjoern
template isProperty(alias func) if (isCallable!(func)) {
enum isProperty = (functionAttributes!(func) &
FunctionAttribute.PROPERTY)==0 ? false : true;
}
More information about the Digitalmars-d
mailing list