As much as C++’s large feature set and "strict" syntax may be seen as a complex thing for newbies to master, it is about giving the power to express everything one wants directly, unlike any other “simpler” language. I cant stop myself from throwing out something I read on wiki recently.
A widely distributed "satirical" article portrayed Bjarne Stroustrup confessing that C++ was deliberately designed to be complex and difficult, weeding out amateur programmers and raising the salaries of the few programmers who could master the language :D.
Yes, thats the challenge. You have all the design tools and if you have the expertise you will definitely love C++. As a matter of fact, I love C for that matter because it gives all the more development speed but then I think its incomplete without all the features and libraries C++ offers on top of it. C++ with its object oriented capability and STL looks a lot more powerful. And with the latest addition being C++11 it adds to the power. Here is a list of things I see in C++11 which excites all the more. Though I am not sure about the stability of all these set of features, it definitely pleases me on the first look. Its time to get your hand dirty trying out all these. Lets have a look at the list:
1) Important Syntax cleanup
2) Automatic type deduction with Auto
3) Range Based for loops
4) Lambda Functions
5) standardized support for multithreaded programming.
6) regex support
7) Chrono library to deal with time duration and points
8) Containers such as unordered_map, unordered_set and Tuples etc
9) Headers for random number generation and ration class templates.
I will try and cover a post on each of these in future. But for now, lets play around with these
new tools. And once the tools are sharpened lets discus them.
Cheers !!!
I almost forgot you started a blog. Good post. Some points -
ReplyDelete1. Execution speed matters more for CPU bound application. Today most of the application work on the web or rather network/io intensive where execution of code is not the major bottleneck rather data transfer,waiting for something etc. are. A approach adopted by companies like Dropbox is to code everything in a language with faster development rate (Python here) and replace parts which need better execution speed with C wrappers or C/ C++.
2. Learning some particular language is easy. You would want the language to go out of way so that you can express yourself freely. C++ by design has a more steeper learning curve once you move outside of C and STLs rather than say Python. I found myself going back to Python for almost every task except for things where time limit exceeded was a problem :)
3. A dynamic language which you might consider higher level language than C/C++ provides some constructs which allows you to implement ideas in a much cleaner way.
4. People using the other languages use them in a rather stupid manner which further degrades the application. A poorly written piece of Python can be optimized to an extent before thinking of other options.
5. Things were written in C for lack of better options :P (just kidding!) System software (and databases. browsers,compilers) will still be written in C/C++ or languages with better execution speed.
6. The list is wrong. YouTube as far as I remember uses Python majorly (there might be some components in other languages)
I would ask you to check Go, a new language (NO NOT ANOTHER LANGUAGE !!!) which is high performing and somewhat easier to use.
So its 8:30 pm and i cannot continue writing more as I was waiting for this to go to cafeteria for food. I dont' know what I wrote. Bye :P
Good points Mr Psychonoob (what a name ;)). The post was written keeping in mind that I dont criticize anything out there but Just to emphasize that C/C++ is still equally good for certain stuff. Given I work in a database company even more. And i still firmly believe that one should learn C and C++, its not a waste of time. You come to know a lot of basic stuff when you write things in C.
ReplyDeleteAnd as far as python is concerned, its really good. Sometimes development speed is of utmost importance, so its not a bad idea to stay away from C at that time. You need to choose your language of preference to express yourself better. Completely agreed. I am actually thinking on updating the post with some of ideas mentioned in the comment. Thanks for enlightening us Mr Pro :)