Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
July 18, 2010 C++ Stylistics | ||||
---|---|---|---|---|
| ||||
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 |
July 18, 2010 Re: C++ Stylistics | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | 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 |
July 18, 2010 Re: C++ Stylistics | ||||
---|---|---|---|---|
| ||||
Posted in reply to Justin Johansson | 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.
-- 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
|
July 19, 2010 Re: C++ Stylistics | ||||
---|---|---|---|---|
| ||||
Posted in reply to BLS | On Sun, 18 Jul 2010 23:21:14 +0200, BLS <windevguy@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 |
July 19, 2010 Re: C++ Stylistics | ||||
---|---|---|---|---|
| ||||
On Mon, 19 Jul 2010 10:52:51 +0200, Rory McGuire <rmcguire@neonova.co.za> wrote:
> On Sun, 18 Jul 2010 23:21:14 +0200, BLS <windevguy@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;
}
|
July 19, 2010 Re: C++ Stylistics | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rory McGuire | On 19/07/2010 10:58, Rory McGuire wrote:
>
> template isProperty(alias func) if (isCallable!(func)) {
> enum isProperty = (functionAttributes!(func) &
> FunctionAttribute.PROPERTY)==0 ? false : true;
> }
THANKS Rory
isProperty() should become part of phobos.
|
July 19, 2010 Re: C++ Stylistics | ||||
---|---|---|---|---|
| ||||
Posted in reply to BLS | On Mon, 19 Jul 2010 20:33:59 +0200, BLS <windevguy@hotmail.de> wrote:
> On 19/07/2010 10:58, Rory McGuire wrote:
>>
>> template isProperty(alias func) if (isCallable!(func)) {
>> enum isProperty = (functionAttributes!(func) &
>> FunctionAttribute.PROPERTY)==0 ? false : true;
>> }
>
>
> THANKS Rory
>
> isProperty() should become part of phobos.
I suppose so, currently one needs to make a wrapper for all the function attributes that you
might want to detect.
|
Copyright © 1999-2021 by the D Language Foundation