Jump to content
Objectivism Online Forum

Is C/c++ Still A Worthwhile Pursuit?

Rate this topic


Cbaoth

Recommended Posts

Hi,

A question for the experienced developers in here.

With the massive uptake in managed .Net based languages (c#, vb.net), do you still think it is worth investing a reasonable amount of time in honing my C++ skills?

My current job requires me to use C#, VB.net and VB6, I aspire to move to a big software developer like Microsoft sometime in the next couple of years and want to invest my self education time wisely with this goal in mind. Work wise, the particular area that interests me is distributed desktop managment (SMS, MOM, GPO)

I am in two minds about this:

On one hand, I feel if I can become very proficient in C++ picking up other languages as needed will be far easier, on the other hand my spare time is limited due to current work commitments and I don't want to waste time on a language that may be made all but obsolete in the coming years.

Any thoughts are appreciated..

Edited by Cbaoth
Link to comment
Share on other sites

C++ is the industry standard language. The vast majority of software out there has been written in C++ as opposed to .NET. Also remember that .NET is Windows only for the most part (yes I know it is cross-platform on paper, but most non-Win OS's don't have it). If you ever plan to develop for any other operating system then you should not limit yourself to .NET.

My current job requires me to develop mostly in VB.NET. But I still have several C++ projects that I maintain because they either aren't possible in a managed environment or are just plain easier in C++. Every language has its uses. .NET was designed to be a high level, RAD platform and MS has accomplished that goal very well. I love it for writing business applications. C++ has very different design goals, so in certain ways comparing the two is like comparing apples and oranges. C++ is meant to be closer to the system level. You mentioned distributed development as an interest, and I would say that C++ is certainly something to look into then. However, .NET also has some great distributed computing facilities. One of the projects I maintain at work uses VB.NET web services running on our servers with a front end running on client machines. We don't have to deal with any of the low-level aspects of communication between those nodes, which makes our lives much easier.

Both of them have their advantages. Pick a language best suited to the problem. Another thought though since you are already a .NET developer. You might want to play around with managed C++. It's basically C++ combined with .NET.

Link to comment
Share on other sites

C++ is still the language of choice if you want to write the fastest software possible, Java and C# are going to be slower. You aren't going to see much(if any) embedded software written in Java or C#. They are fine for desktop applications and internet stuff. But if you are going to write the embedded control software for a piece of hardware, C++ all the way.

Link to comment
Share on other sites

But if you are going to write the embedded control software for a piece of hardware, C++ all the way.

When it comes to strictly embedded stuff, C is often preffered to C++, as it tends to produce smaller code. (a lot of embedded compilers I'm dealing with don't even support C++). The tradeoff being between space © and maintainability (C++).

Link to comment
Share on other sites

edit: I decided to remove this post - snide anti-C++ comments probably wont help you to make a decision :o

However, I would say that learning C++ is only worthwhile if you think you would be happy working in a job where you have to use C++. Personally I find that idea very uinappealing, but ymmv.

Edited by Hal
Link to comment
Share on other sites

Simple, try to do a job search on a site like monster and find a job position for vb.net or c sharp that does not involve an ASP.NET layer or web services.

actually...use www.indeed.com it will pull up job postings across several job boards and company postings. Very. very handy....

Link to comment
Share on other sites

When it comes to strictly embedded stuff, C is often preffered to C++, as it tends to produce smaller code. (a lot of embedded compilers I'm dealing with don't even support C++). The tradeoff being between space © and maintainability (C++).

This gets somewhat to the issue of the original post.

Software engineering is an interplay of design/engineering issues against execution/performance issues. As the code gets large and complicated, the engineer needs tools to help manage the code (OOP and such, which C# and the whole .NET thing gets at) which in the end adversely effects the code's performance.

The issue even comes up with C...if we wanted REALLY high performance code, we'd write it all in assembly.

So keep in mind that C# and .NET sacrifice a lot of performance for what they give. C++ has its place (with higher performance) as well as C with (apparently) still higher performance. And your guru augments their C with some assembly code to make it even faster.

Link to comment
Share on other sites

I write exclusively in managed code, and I think that for the kind of software I write, not only am I much more productive than a C/C++ programmer, but my code is faster as well. Sure, for an equivalent design, low-level code would be faster, but it is not practically possible to reproduce all the overheard code that a managed runtime like .Net creates for you.

For example, I make even trivial functions multithreaded. .Net eliminates most of the low-level complexity of multithreaded code, which means that I’m writing things in the most efficient way possible (because MS engineers wrote the low level stuff) and I can use multithreading much more extensively.

I also cache all my objects extensively using the built-in functionality. An equivalent one-time C operation might be faster, but you can’t do all that caching because it’s just too hard and context dependent.

In short, unless you are going to be writing kernel-level or hardware-intensive applications, and you are not constrained by your employment situation, I would focus on learning managed code.

Link to comment
Share on other sites

I think different kinds of programs are written in C++ vs managed languages. If you are interested in writing mathematical, bio-tech type software, definitely brush up on C++. However if you think you will be writing business/web software, or that's what interests you, the maybe focus on C# or Java.

Link to comment
Share on other sites

I think different kinds of programs are written in C++ vs managed languages. If you are interested in writing mathematical, bio-tech type software, definitely brush up on C++.
I'd be surprised if there was much mathematical software written in C++ - its a terrible language for implementing algorithms (too low-level - a good programming language should be transparent, rather than forcing you to mess around with things like memory allocation), and if raw speed is really that important, C would be a better choice.

Out of the 'big 3' mathematical packages, Maple is written in Java (:)), Matlab in C, and Mathematica in some OO C-hybrid. Honestly, I cant think of many worse mainstream languages than C++ for doing mathematics in :/

Edited by Hal
Link to comment
Share on other sites

  • 2 weeks later...

Thanks for all the replies, they have given me some things to think about. For the time being it seems Microsoft will continue to write most of there System applications in unmanaged C, while providing managed interfaces to these libraries. So a balance of the two would seem sensible considering my employment aspirations.

Link to comment
Share on other sites

To be more exact, Microsoft uses C++ for system development, not C.

.Net is just four years old, but it's in a number of products:

* Visual Studio 2005: 7.5 million lines

* SQL Server 2005: 3 million lines

* BizTalk Server: 2 million lines

* Visual Studio Team System: 1.7 million lines

* Windows Presentation Foundation: 900K lines

* Windows Sharepoint Services: 750K lines

* Expression Interactive Designer: 250K lines

* Sharepoint Portal Server: 200K lines

* Content Management Server: 100K lines

Link to comment
Share on other sites

  • 1 month later...

I for one, used to be more of a fan of C++ (and C to a lesser extent), however once I started dabbling with VB.NET, I realised that for the sort of thing I want to do (at the moment at least), where I want to develop programs where proccessing speed is not a critical factor, and assuming I am catering Windows (or LInux via Mono perhaps), .NET is superior, and much more efficent.

However, I intend to continue my education in C++ (and Java) as it is more suited (at least as I understand it currently) for Linux systems. Qt, a C++ development kit allows programs to be recompiled for different platforms without any source code changes required. However, this is less of an issue, now that Macs can run Windows applications on XP, using Macs with Intel chips and the Boot Camp software....

So yes, I think it is still worthwhile, though the cross-platform thing seems to be becoming less of an issue as time goes by. Howver, there are still many projects done in C/C++ and many jobs that focus on such languages or use such languages a fair bit. In fact, most programming jobs in New Zealand fall into such categories for instance, or so I am told.

Edited by Prometheus98876
Link to comment
Share on other sites

  • 1 month later...

In the academic field of operations research, specifically optimization, C is by far the most widely used programming language. This is not only for primarily academic research in computational integer programming, graph algorithms and meta-heuristics but also in solving large scale optimization programs for companies.

Link to comment
Share on other sites

  • 2 months later...

Also alot of the better/more prominent game development libraries (notably OpenGL) use C/C++, and SDL (an excellent multimedia libary) too, and many other such things. Also WxWidgets, which seems a worthy alternative to Qt is based around C++, it is an excellent cross-platform system with some excellent, powerful classes available.

Although more and more of these things are being ported to other languages. Such as SDL.NET, for the .NET languages (C#, VB etc).

Link to comment
Share on other sites

Hi,

A question for the experienced developers in here.

With the massive uptake in managed .Net based languages (c#, vb.net), do you still think it is worth investing a reasonable amount of time in honing my C++ skills?

Well for starters one .NET based tool uses C++. It is called Visual C++.

Secondly, as Lathanar said, there will always be legacy apps out there that require older languages. However, I would not advise the use of COBOL. He is also wrong that it is stuck in the web arena. Many good and powerful programs are made using Microsoft's Visual Studio, which uses the .NET Framework.

Thirdly, as skap35 says C++ is the industry standard and is cross platform unlike .NET languages (though there is a Linux tool called Mono that is being made to fix this). Also to run a .NET application the user needs the .NET Framework. No framework is needed for C++.

Fifthly, I agree with GreedyCapitalist about managed code being more practical to the programmer. But I do believe C/C++ has it's place as well (small console applications mainly). But then .NET has managed code version of non-managed languages (Visual C++, Visual C#, and Visual J# (it's not Java, it's only based on it). These Visual Studio programs also make things easier by including visual designers. I use the Express versions of Visual Studio 2005 (can't afford the paid version but maybe I'll get Visual Studio Standard when I can afford it). I am also looking into Microsoft's new Expression Interactive Designer (currently a CTP).

Lastly, Prometheus98876 forgot to add that Qt's free licence only allows freeware applications to be developed and the Enterprise edition which allows you to charge for applications charges a very steep price that only enterprises could afford. At least the WxWidgets (which he also mentions) licence allows you to make commercial applications and is the program is free. He also forgot to mention that both programs add their own extensions to C++, though he did hint at it.

Well that's all I have to say for now, though I am probably too late by now. :-(

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...