SgDotNet
Singapore Professional .NET User Group -For Cool Developers

Learning C++

rated by 0 users
This post has 57 Replies | 0 Followers

Top 75 Contributor
Posts 29

I forgot to explain what Visual C++ .NET is about in the explanation of the term “C++ .NET”. I add it in the square brackets as follows to make it clear. The addition does not change the meaning of the original paragraph.

 

·        The term C++ .NET, I believe that it should refer to Visual C++ .NET. [It is a development environment for C++ programs; it is not another kind of Microsoft C++ language. Visual C++ .NET allows you to write either unmanaged C++ or managed C++ or a mix.] However, not all of C++ developers are using Visual C++ .NET for development. They have their own favorite editors to write code. Those C++ developers sometimes might say that they are developing applications in “C++ .NET”. I guess what they really mean is “C++ over .NET” or “non-traditional C++ on .NET”. What they mean should be “managed C++. They are developing in C++ and target the .NET runtime. You can play with managed C++ with the command-line compilation using this kit http://msdn.microsoft.com/visualc/vctoolkit2003/.

Top 10 Contributor
Posts 1,626
Guys... I have not starting a thing until now... Crying
Software development made easy with Paladin RAD Framework. Save some trees, use Stickies.NET
Top 25 Contributor
Posts 330
I hope you would listen to my humble advice to learn C++ from STL directly. STL is the spirit of the modern C++. We should really leave behind the very root of C and make use of the extreme expressiveness of (modern) C++, the powerful standard library and its generic idiom.

I believe, contrast to popular belief, learning from STL would have less pain than starting from the basics of C because in most application development today, those are having just too many unnecessary low-level details.

By all means, C++ is not that difficult, just get familiar with it, after some time, you will feel comfortable. C++ is NOT an elitist language, it is just one language you would (or not) prefer to speak. Wink







blackinkbottle "please polish my crude soul", to the maker of blade the Samurai kneed down and said.
Top 10 Contributor
Posts 1,125
 blackinkbottle wrote:
I hope you would listen to my humble advice to learn C++ from STL directly. STL is the spirit of the modern C++. We should really leave behind the very root of C and make use of the extreme expressiveness of (modern) C++, the powerful standard library and its generic idiom.

I believe, contrast to popular belief, learning from STL would have less pain than starting from the basics of C because in most application development today, those are having just too many unnecessary low-level details.

By all means, C++ is not that difficult, just get familiar with it, after some time, you will feel comfortable. C++ is NOT an elitist language, it is just one language you would (or not) prefer to speak. Wink


I agree with bib, you should start from STL directly.
Blog -> http://www.dotnetjunkies.com/weblog/rohanthomas/ Singapore's Professional .NET User Group Rocks!!!! Yes
Top 75 Contributor
Posts 29

As I would suggest the new C++ learners to start with ANSI C++ in my previous post, I would think that I should give a further note for new comers.

 

STL (Standard Template Library) is part of ANSI C++ standard library. Some new comers might be confused that STL is part of the C++ language itself. It is actually a set of C++ generic data structures and algorithms to provide reusable without sacrificing efficiency. One of the great things in learning C++ is to learn how to use STL in efficient way. However, this does not mean you should learn how to use STL from the first day of your C++ and forget the purpose of C++ language.

 

You need to review why you (or your boss) choose C++? If you are targeting .NET, why not choose C# or others? [Note: C++/CLI is coming and is really exciting for existing C++ developers on .NET. For those .NET developers who love STL, they should love STL.NET as well] Maybe your boss just wants you to pick up some C++ skill to fix some bugs in the existing C++ applications. In that case, what you need to know depends on what bugs you want to fix.

 

When you do C++ development, you are supposed to use object-oriented programming techniques in your development. You will need to put in quite amount of effort and time to learn how to design your C++ types (hierarchy) properly. STL won’t help you on this, though STL provides reusable components and does save your time in development. You use STL in some methods when you see fit. You don’t use STL as the starting point in designing your C++ type.

 

Shawn

 

Top 25 Contributor
Posts 330

Well... true of coz, if someone is jumping directly onto C++ without any prior OO programming language experience, in any language. Nowadays OO is just too popular to be missed for a new comer.

In my view, generic is far being a fundamental style of modern C++. In a very simplified form, it is container + algorithm, well also string and iostream. I think all these are more basic building blocks than the construction of classes. We did learn array and string before class, right? Stick out tongue

In other words, it might be too tempting to learn a lot of less ideal alternatives conveniently when learnn C++, if not starting with STL and most importantly, STL does not conflict with learning OO at all.

In addition, OO in C++ is not so different from C# or Java, except the syntax maybe. If you got good exp in C# or Java, that OO experience should contribute very positively to learning C++ in the OO way, and all the principles still apply.

But C++ is more than OO, for example, generic idiom of STL - this is a concept needed to be built up from the very beginning. Also, most modern C++ libraries are written with templates (eg boost). Language would prob lost half of its life span if without the support of a good library (just look at C#, Java..), and STL and other modern C++ libraries are here to help C++ grow.

Of coz it is very true to evaluate the decision of using C++ at your workplace or by you, as C++(and C) spanned such a long time, from ancient procedural code to adaptation to OO (also MFC to blame for "contaminate" Wink C++, rise and fall of COM), to generic pattern and "insane" metatemplate programming or even some device driver low level stuff. You have to do some close inspection to find out when the legacy code is written and who the person is, or luckily you are creating a complete new application.

blackinkbottle "please polish my crude soul", to the maker of blade the Samurai kneed down and said.
Top 75 Contributor
Posts 29

Of course picking up STL during learning C++ is encouraged. As I mentioned in the last post, one of the great things in learning C++ is to learn how to use STL in efficient way. The point here is “efficient”, NOT as much as possible. If there are more than one solutions for a particular problem, the solution chosen should be judged by the tradeoff among those.

 

I also emphasize the use of object-oriented programming techniques in the C++ development. If you are familiar with C# or Java programming techniques, that’s indeed going to help you to move to C++. But be aware that each language has different object model and programming practices. They are not just different in syntax. And that is going to affect your design.

 

 Shawn

Top 10 Contributor
Posts 1,626
I blur blur oledi. Tongue Tied
Software development made easy with Paladin RAD Framework. Save some trees, use Stickies.NET
Top 10 Contributor
Posts 1,125
Just an excellent discussion of C++ STL and other stuff... We are just the audience..Stick out tongue
Too high-tech liao...
Blog -> http://www.dotnetjunkies.com/weblog/rohanthomas/ Singapore's Professional .NET User Group Rocks!!!! Yes
Top 10 Contributor
Posts 1,626
I try reading about an intro to STL yesterday and I blur blur oledi. Crying
Software development made easy with Paladin RAD Framework. Save some trees, use Stickies.NET
Top 10 Contributor
Posts 1,221

Think of STL as your .NET Framework.

It simply consist of the very basic things.

Containers
Iterators
Algorithms

That's the entire STL explained. Smile

Regards, triplez ------------------------------ http://triplez.mine.nu/blogs
Top 10 Contributor
Posts 1,125
 triplez wrote:

Think of STL as your .NET Framework.

It simply consist of the very basic things.

Containers
Iterators
Algorithms

That's the entire STL explained. Smile


Exactly, further more if you are from C++ backgroud it would be a piece of cake...
Blog -> http://www.dotnetjunkies.com/weblog/rohanthomas/ Singapore's Professional .NET User Group Rocks!!!! Yes
Top 10 Contributor
Posts 1,626
 xtreme.net wrote:
Exactly, further more if you are from C++ backgroud it would be a piece of cake...


I'm not from c++ background. Crying
Software development made easy with Paladin RAD Framework. Save some trees, use Stickies.NET
Top 10 Contributor
Posts 1,221
Let me rephrase his words. C# background. LOL.
Regards, triplez ------------------------------ http://triplez.mine.nu/blogs
Top 10 Contributor
Posts 1,125
 triplez wrote:
Let me rephrase his words. C# background. LOL.

Thanks buddy... Well, there ya go...
Blog -> http://www.dotnetjunkies.com/weblog/rohanthomas/ Singapore's Professional .NET User Group Rocks!!!! Yes
Page 2 of 4 (58 items) < Previous 1 2 3 4 Next > | RSS
Copyright SgDotNet 2004-2008
Powered by Community Server (Commercial Edition), by Telligent Systems