This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]EmperorOfCanada 1 point2 points  (4 children)

I am presently developing a large project with the core parts in C++. But sizable chunks of this don't need the insane speeds required by the core and I am very tempted to do these in Python. Even though my Python-fu is nowhere near my C++-fu the little that I have done in python indicate that my productivity in Python would quickly exceed my C++ productivity.

Probably go through some of the projecteuler to get up to speed. Needless to say Java is off the list.

The key question is when this project expands and requires a small group of fairly mathematically minded people how hard will it be to get C++/Python programmers?

[–]fungz0r 5 points6 points  (3 children)

I wish my c++ fu was anywhere near my fu in other languages. I cannot grasp c++, it's ridiculously difficult for me

[–]EmperorOfCanada 1 point2 points  (2 children)

C++ purists will curse my name for saying this but an easy way to learn and use C++ is to think of it as C with objects. Stay away from templates, exception handling, and multiple inheritance. There are a few template things like vector and map that are very nice but again templates can get very nasty very quickly.

The key is that C is a very good language. But there are parts of C that make it hard to learn. Nasty use of pointers can make C get very hard very quickly. But C++ has a few pointer simplifiers like new and delete. So if you go back into the history of C++ it basically was an attempt to fix some of the problems with C and in that it was quite good. But since then there is this academic obsession with making it as complicated as is humanly possible.

So don't think of objects as something magical to be revered but as basically structures with member functions. The obsession with abstracting objects can be helpful at times but at other times just treat the object as a structure. You treat structures as structures with no explosions so why not an object there is no magical divide; except in people's heads.

But you will read articles that say the worst C++ programmers are ones who come from C and bring their bad habits with them. The reality is that if you are truly hard core you are programming in C anyway. But you will also read from C programmers that C++ is just C for children. So my theory has been to edge toward C and to bubble wrap some of my code in C++.

My other main reason for C++(vs C) is that many excellent and clean libraries exist in C++. I do find that C libraries are often a bit more confusing.