April 04, 2008 Re: C++0x now with lambda and closure | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ralf Schneider | Ralf Schneider: > Have a look at Ultimate++: http://www.ultimatepp.org/src$Sql$SqlExp$en-us.html An interesting toolkit. If you look at this page: http://www.ultimatepp.org/www$uppweb$overview$en-us.html The part titled "Value and Null" shows you that they are re-inventing dynamic typing (== always using a variant-like type) to do GUI programming. There's even a comparison with D: http://www.ultimatepp.org/www$uppweb$vsd$en-us.html With the comment: "Means C++ is still well ahead of D (by 70%) if not being hold back by standard library design and average implementation..." :-) Bye, bearophile |
April 04, 2008 Re: C++0x now with lambda and closure | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | bearophile wrote:
> Ralf Schneider:
>> Have a look at Ultimate++: http://www.ultimatepp.org/src$Sql$SqlExp$en-us.html
>
> An interesting toolkit.
> If you look at this page:
> http://www.ultimatepp.org/www$uppweb$overview$en-us.html
> The part titled "Value and Null" shows you that they are re-inventing dynamic typing (== always using a variant-like type) to do GUI programming.
>
> There's even a comparison with D:
> http://www.ultimatepp.org/www$uppweb$vsd$en-us.html
> With the comment: "Means C++ is still well ahead of D (by 70%) if not being hold back by standard library design and average implementation..."
> :-)
>
> Bye,
> bearophile
U++ is an excellent toolkit, it takes a while to get used to their whole transfer-semantics thing, but once you do it's a pleasure. The code is really short and easy to read.
For GUI app development I'd pick U++/C++ over D any day.
(a few years ago, I implemented a 3D height map editor with support for "infinitely" big terrains, WYSIWYG editing/texturing and a lot of other stuff in U++)
|
April 04, 2008 Re: C++0x now with lambda and closure | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tomas Lindquist Olsen | Tomas Lindquist Olsen: > The code is really short and easy to read. For GUI app development I'd pick U++/C++ over D any day. Is it possible to design a similar API in D too? I'll take a better look at U++ then, it seems it's partially free too. Its hash maps seem quite faster than D ones, so I think such design ideas may be used to improve D AAs. I like the API of the now dead WAX GUI toolkit (that works with Wx): http://zephyrfalcon.org/labs/wax.html http://zephyrfalcon.org/waxapi/index_h.html Bye, bearophile |
April 04, 2008 Re: C++0x now with lambda and closure | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | bearophile wrote: > Tomas Lindquist Olsen: >> The code is really short and easy to read. For GUI app development I'd pick U++/C++ over D any day. > > Is it possible to design a similar API in D too? > > I'll take a better look at U++ then, it seems it's partially free too. Its hash maps seem quite faster than D ones, so I think such design ideas may be used to improve D AAs. > > I like the API of the now dead WAX GUI toolkit (that works with Wx): > http://zephyrfalcon.org/labs/wax.html > http://zephyrfalcon.org/waxapi/index_h.html > > Bye, > bearophile First, go get the real benefit from U++, you need to use their IDE. To me this was a real pain in the beginning. But _only for a few weeks_. After that it's really a pleasure. * It has the best highlighting I've seen in any C++ editor (it highlight's scopes with slightly different background colors). * The forms editor is a must for GUI apps. * Internationalisation is trivial with built in features (you have to wrap all strings in _t("hello") etc though) * nice component based project management. I could go on and on. This thing just makes gui coding so nice, I can't understand why more people aren't using it... It kinda funny how the way they do all their magic is by completely ignoring "normal" C++ coding practices, with 'const' and 'mutable' [1] being the most important keywords... [1]: http://www.ultimatepp.org/srcdoc$Core$pick_$en-us.html - search for '#define pick_ const' |
April 04, 2008 Re: C++0x now with lambda and closure | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tomas Lindquist Olsen | Tomas Lindquist Olsen wrote:
> bearophile wrote:
>> Ralf Schneider:
>>> Have a look at Ultimate++: http://www.ultimatepp.org/src$Sql$SqlExp$en-us.html
>>
>> An interesting toolkit.
>> If you look at this page:
>> http://www.ultimatepp.org/www$uppweb$overview$en-us.html
>> The part titled "Value and Null" shows you that they are re-inventing dynamic typing (== always using a variant-like type) to do GUI programming.
>>
>> There's even a comparison with D:
>> http://www.ultimatepp.org/www$uppweb$vsd$en-us.html
>> With the comment: "Means C++ is still well ahead of D (by 70%) if not being hold back by standard library design and average implementation..."
>> :-)
>>
>> Bye,
>> bearophile
>
> U++ is an excellent toolkit, it takes a while to get used to their whole transfer-semantics thing, but once you do it's a pleasure. The code is really short and easy to read.
>
> For GUI app development I'd pick U++/C++ over D any day.
>
> (a few years ago, I implemented a 3D height map editor with support for "infinitely" big terrains, WYSIWYG editing/texturing and a lot of other stuff in U++)
Doesn't seem to have any garbage collection, though. Probably a part of where their speed advantage comes from.
|
April 10, 2008 Re: C++0x now with lambda and closure | ||||
---|---|---|---|---|
| ||||
Posted in reply to guslay | guslay wrote: > For those keeping track... > > http://herbsutter.spaces.live.com/ > > Crazy syntax, at least it looks better than boost. > What happens to the outer variables? Is a copy of them created for each evaluated closure object? Or does there exist only a single instance of each, as in D? And how is the closure object destroyed, since there is no GC? (does one have to assign it to a variable, to later delete it?) I tried to read the proposal to find an answer, but I couldn't quickly grasp it. -- Bruno Medeiros - MSc in CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D |
April 11, 2008 Re: C++0x now with lambda and closure | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bruno Medeiros | == Quote from Bruno Medeiros (brunodomedeiros+spam@com.gmail)'s article > guslay wrote: > > For those keeping track... > > > > http://herbsutter.spaces.live.com/ > > > > Crazy syntax, at least it looks better than boost. > > > What happens to the outer variables? Is a copy of them created for each > evaluated closure object? Or does there exist only a single instance of > each, as in D? > And how is the closure object destroyed, since there is no GC? (does one > have to assign it to a variable, to later delete it?) > I tried to read the proposal to find an answer, but I couldn't quickly > grasp it. From memory, it looked like variables could either be copied or manipulated by reference, and that the closure object was basically just an opaque struct much like a plain old functor. Sean |
April 11, 2008 Re: C++0x now with lambda and closure | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | Sean Kelly wrote: > == Quote from Bruno Medeiros (brunodomedeiros+spam@com.gmail)'s article >> guslay wrote: >>> For those keeping track... >>> >>> http://herbsutter.spaces.live.com/ >>> >>> Crazy syntax, at least it looks better than boost. >>> >> What happens to the outer variables? Is a copy of them created for each >> evaluated closure object? Or does there exist only a single instance of >> each, as in D? >> And how is the closure object destroyed, since there is no GC? (does one >> have to assign it to a variable, to later delete it?) >> I tried to read the proposal to find an answer, but I couldn't quickly >> grasp it. > > From memory, it looked like variables could either be copied or manipulated > by reference, and that the closure object was basically just an opaque struct > much like a plain old functor. > > > Sean Yes, that seems to make sense all around. I was originally surprised by this announcement because it was not possible for C++ to implement "full" closures without having a GC. So it was either closures with outer variables that became invalid after the enclosing function exited (the D situation until some releases ago), or making copies of outer variables. Still, altough this closure semantics is not as 100% "full" as other languages (latest D, C#, Lisps, etc.) it's still useful enough for C++, and I'm surprised how relatively cleanly it fit in, unlike several of the other extensions which seem like ugly and crufty additions. -- Bruno Medeiros - MSc in CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D |
Copyright © 1999-2021 by the D Language Foundation