On Wed, 12 Feb 2014 13:59:08 +0200 Kolya Kosenko wrote:
KK> Also there is some C++11 functions that isn't mentioned in the PDF such
KK> as data() and emplace_back():
KK>
KK> http://en.cppreference.com/w/cpp/container/vector
Yes, we could easily add those to wxVector.
KK> wxArrayString will require modification (initializer_list) because there
KK> is no other way to set wxListBox, wxChoice and wxComboBox choices.
This does bother me and I'd like to do something about it. We already have
wxArrayStringsAdapter but it's not used in the public API. I think it
should be. And this class should definitely have a ctor from initializer
list (inside "#if __cplusplus >= 201103L", of course). And one from std::
vector<T>, where T is convertible to wxString, too.
KK> There is no alternatives for methods such as wxWindow::GetChildren() and
KK> therefore wxList is a part of used API. So if this class be marked as
KK> deprecated, all based functions also should be deprecated?
This is another problem I'd really like to fix. We can't do anything about
the non-const overload, but I think this one should be deprecated anyhow as
you can't just modify the children list outside of the window anyhow. As
for the const one, I am not sure what to do about it... AFAICS it should
already be possible to write something like
for (auto child: window->GetChildren())
child->Hide();
in C++11 code as wxWindowList does have begin/end() methods (perhaps we
need to add cbegin/cend() though). So while creating/modifying wxWindowList
is still ugly, using it is already as convenient as it can be, unless I'm
missing something.
KK> > And wxString could, indeed, gain from having a move ctor/assignment
KK> > operator. This should be pretty simple to do, too...
KK>
KK> C++11 string has more additional functions then just move ctor/assigment
KK> operator:
KK>
KK> http://en.cppreference.com/w/cpp/string/basic_string
Right, and stox() as well as to_string() could be very easily implemented
using the existing wxString methods.
KK> > I wouldn't go as far as saying that he's famous, but he does run a web
KK> > site about C++.
KK>
KK> IIUC meetingcpp is Jens Weller, "Jens Weller works since 2007 as a
KK> freelancer in C++, specialised in consulting, training and programming
KK> C++ and has more then 12 years of C++ expierence.
And still doesn't know much about C++ nor can spell "experience"
correctly. Hard to muster a lot of respect for the guy.
Again, there is nothing wrong with not knowing everything about C++, few
people actually do (and I'm not one of them myself). But I can't stand
people trying to pass themselves for experts when they don't know the
absolute basics.
KK> When C++11 API will be added to wxWidgets it would be nice if Jens
KK> Weller provide unofficial review before official public announce. He
KK> writes reviews regularly in his blog and I think he will be happy to do
KK> that.
I'd be grateful for any help with wxWidgets evangelising/whatever that
others can provide. I'm afraid I really can't bring myself to ask him for a
review with a straight face though.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/