|
|
Home » Community » Coffee corner » Pick overloaded by Rvalue?
Re: Pick overloaded by Rvalue? [message #19234 is a reply to message #19233] |
Sat, 22 November 2008 10:49   |
|
VC from VS2010 already supports rvaluses, lambdas, auto, and static_assert. But I agree that c++ is too bloated and it is going to be more bloated. This is not good. I would like iso guys to remove headers instead of adding half of those new features. Right now I use c# in my job. I must admit it's a very good language. Even without all those cool features like linq or auto genrating conctructors I found the code written in it a way easier to read (I'm comparing to typical c++ code). And the compilation times are very good. You know I'm tired watching these magic signs like *, &, ->, :: (including combinations) all the time. Switching between header and source simply drives me crazy Now additionaly we have &&... Writing inelisense for c++ is a horror (ask Mirek )
On the other hand I find Upp library marvelous and realy simple to use. What a pity we don't have a better language under it. D is interesting but it follows GC path. GTK fellows wrote VALA maybe we could do something similar like UL (Ultimate language).
PS: You wrote the longest post in history of this forum I guess .
|
|
|
Re: Pick overloaded by Rvalue? [message #19236 is a reply to message #19234] |
Sat, 22 November 2008 13:19   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
unodgs wrote on Sat, 22 November 2008 04:49 |
Writing inelisense for c++ is a horror (ask Mirek )
|
It is funny challenge for sure 
unodgs wrote on Sat, 22 November 2008 04:49 |
we could do something similar like UL (Ultimate language).
|
I believe, in a sense, we already did...
You are not going to meet many of those complex constructs in U++ production code.
Anyway, maybe I am just too self-satisfied, but personally I see nothing particulary interesting or helpful in next C++ standard - except maybe clarifications of MT issues, but that is more about what code is "correct by standard", not a game changer in existing practices.
I can imagine a lot of evolutionary improvements and some inevitable cleanups, but overal, for me, U++ succeeded. This is THE environment I wanted to work in 
Mirek
|
|
|
|
|
|
|
Re: Pick overloaded by Rvalue? [message #19281 is a reply to message #19280] |
Mon, 24 November 2008 06:55   |
bytefield
Messages: 210 Registered: December 2007
|
Experienced Member |
|
|
I think if C# will have a JIT compiler which will generate(once on a platform) CIL code mixed with native code for parts of code which run often and need performance it will be the choice for applications (non-system) instead of C++. Just think, only first run of the program on that platform will be slow then it should run from a cache and have the performance almost equal with native programs.
cdabbd745f1234c2751ee1f932d1dd75
|
|
|
|
Re: Pick overloaded by Rvalue? [message #19283 is a reply to message #19088] |
Mon, 24 November 2008 09:05   |
mr_ped
Messages: 826 Registered: November 2005 Location: Czech Republic - Praha
|
Experienced Contributor |
|
|
I think as long as you stay "KISS" with your SW, C++ will be always superior in terms of performance.
If you let your code grow in complexity, it may be that "higher" language like Java/C# would help cut some complexity out, and protect you from some bloat, so the performance of C# vs C++ would be similar then. But that's not C++ failure or C# win, that's solely failure of code design.
Quote: | So what we need is something that compiles to machine code without the complexity of C++. What is there now? What is coming up that merges the benefits of both C++ and interpreted languages?
|
The only thing forcing to use all the complexity of C++ are the underlying libs. If you use simple enough libs, or well encapsulated and well working, so you don't have to dig into them, then just your source decides the level of C++ complexity you have to manage. I mean, you can write very simple (and dumb) source in C++. But it may get quite larger/bloated, than the same functionality written with more complex C++.
Then at some point you have to adopt some source from someone else... and there you go, a) it's easier to write code, than read, b) he will certainly use some C++ features, with which you are not familiar enough and don't feel comfortably using it.
Also I think big part of that "C# is less complex" is strong platform API which helps you more times than C++ stdlib. Surely it's the language definition too, but when I write some simple GUI app with U++, it looks insanely simple. Thank to underlying U++ lib which hides lot of complexity.
[Updated on: Mon, 24 November 2008 09:09] Report message to a moderator
|
|
|
Re: Pick overloaded by Rvalue? [message #19285 is a reply to message #19283] |
Mon, 24 November 2008 10:47   |
bytefield
Messages: 210 Registered: December 2007
|
Experienced Member |
|
|
So, is better for Upp and for us to stay away from C++ new standard.
luzr wrote | Unfortunately, the main disadvantage of rvalue references is that they do not compose:
struct Foo {
Vector<int> x, y;
};
- such construct would lack auto-generated pick constructor.
|
I think that is solved by using rvalue references + "move" constructor, that if every object implement move constructor(thought not auto-generated).
Anyway, why take so much to implement C++0x? I see g++ advancing pretty fast while implement new standard, e.g. now it support rvalue references in 4.3.2 (with -std=c++0x) and initializer lists in g++ from svn. However, is better implmentig it slowly, it means i will have 3 years from now to learn new standard and i think 3 years are enough.
cdabbd745f1234c2751ee1f932d1dd75
|
|
|
Re: Pick overloaded by Rvalue? [message #19286 is a reply to message #19285] |
Mon, 24 November 2008 11:59   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
bytefield wrote on Mon, 24 November 2008 04:47 | So, is better for Upp and for us to stay away from C++ new standard.
luzr wrote | Unfortunately, the main disadvantage of rvalue references is that they do not compose:
struct Foo {
Vector<int> x, y;
};
- such construct would lack auto-generated pick constructor.
|
I think that is solved by using rvalue references + "move" constructor, that if every object implement move constructor(thought not auto-generated).
|
Last time I have checked, compiler never generates implicit move constructor.
Moreover:
struct Foo {
Vector<int> x;
int y;
};
Here U++ has natural pick copy of Foo - created by mixing 'deep' and 'pick' constructors of various members.
Well, AFAIK, authors of r-value references considered such feature "too complex and error-prone". Go figure 
(It is however possible that the stance has changed since then - in that case, my stance w.r.t. next C++ would completely changed 
Mirek
[Updated on: Mon, 24 November 2008 12:03] Report message to a moderator
|
|
|
Re: Pick overloaded by Rvalue? [message #19296 is a reply to message #19283] |
Mon, 24 November 2008 19:25  |
captainc
Messages: 278 Registered: December 2006 Location: New Jersey, USA
|
Experienced Member |
|
|
Yeah, I meant JIT Compiler, but for some reason I wrote interpreter.
Quote: | Surely it's the language definition too, but when I write some simple GUI app with U++, it looks insanely simple. Thank to underlying U++ lib which hides lot of complexity.
|
Exactly why U++ is so good... Much cleaner and simple code with good libraries.
I wonder if it would be easy to integrate U++ into existing C++ projects or development environments.
|
|
|
Goto Forum:
Current Time: Sun Apr 27 01:35:21 CEST 2025
Total time taken to generate the page: 0.01166 seconds
|
|
|