User forums > General (but related to Code::Blocks)

c++11

<< < (3/5) > >>

oBFusCATed:

--- Quote from: ptDev on October 14, 2013, 08:58:27 pm ---I remember seeing a while back a program that was distributed as single packed archive that even contained its own version of libstdc++ and a number of system shared objects, so it is possible to provide a custom build that is not based on the system libraries, it will just prevent one from using debian packages or rpms, but it still is possible at the expense of a rather bloated binary distribution.

--- End quote ---
Of course this is technically possible, all binary-only softwares do it.
But this is not the point of open source and we will loose all the benefits of distros.

frithjofh:
I should not brought this up at all. but I think the devs are right from every practical standpoint...

just because I (or anyone else) like some features of C++11 is NOT enough.  ;)

mistar:

--- Quote from: frithjofh on October 14, 2013, 09:13:45 pm ---I should not brought this up at all. but I think the devs are right from every practical standpoint...

just because I (or anyone else) like some features of C++11 is NOT enough.  ;)

--- End quote ---

Those features are designed to simplify code maintainance, memory management and many other things.
Of course, it would require wxWidgets to be written using smart pointers and RAII (and that would clean up their API, ownership management and so on, but it is out of scope here).
So, the important thing is that C++11 features are not just syntactic sugar to simplify writing code, but to simplify code design and those features would greatly help YOU, devs, to maintain C::B sources ;)

frithjofh:
hi,

so we found another point: the whole wxWidgets part of the game. What do the devs think about this, and the problem it presents for adapting c::b to c++11 ?

and as a note: I am certainly not a dev here :) just a guy who does programming in spare time. and I certainly don't mean to say that c++11 is syntactical sugar. nothing would be more wrong thinking. it takes out so much of the clumsiness of c++, and lets one focus more on what to express and achieve... my personal favorite are the lamdas and the move semantics...  ;D

regards

mistar:

--- Quote from: frithjofh on October 15, 2013, 09:18:29 am ---hi,

so we found another point: the whole wxWidgets part of the game. What do the devs think about this, and the problem it presents for adapting c::b to c++11 ?

and as a note: I am certainly not a dev here :) just a guy who does programming in spare time. and I certainly don't mean to say that c++11 is syntactical sugar. nothing would be more wrong thinking. it takes out so much of the clumsiness of c++, and lets one focus more on what to express and achieve... my personal favorite are the lamdas and the move semantics...  ;D

regards

--- End quote ---

rvalue references are most important for an average programmer IHMO, they enable move semantics. Lambdas are just syntactic sugar (but of course very helpful) :)
Both wxWidgets and C::B would benefit much from using move semantics, mainly in passing wxStrings (for example long strings from text areas).
It is interesting that the following lines (in wxWidgets source) suffice to enable move semantics (as wxString uses std::string internally):

--- Code: ---#if (__cplusplus >= 201103L)
  wxString(wxString &&) = default;
  wxString operator=(wxString &&) = default;
#endif
--- End code ---

then pass a wxString by value whenever you modify it inside (a compiler decides whether to copy or move in this case) or by const ref for read-only.

Ok, a little bit offtopic, but I hope C::B will be going in right direction :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version