473,378 Members | 1,594 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

C++ for Windows development

Scenario: programming GUI applications in Windows.

If I need speed, I'll use C. If I need object orientation I'll use C#
(which facilitate the creation of the user interface as well).

So my question is, in today's windows programming world, where does c++
fit? What's the reason that leads to develop in C++ today (unless you
are a C++ veteran, so programming in C++ is justified by the fact that
it's your favorite language)?

Thanks,

sunrise

Jul 14 '06 #1
10 1419
pl************@gmail.com wrote:
Scenario: programming GUI applications in Windows.

If I need speed, I'll use C. If I need object orientation I'll use C#
(which facilitate the creation of the user interface as well).

So my question is, in today's windows programming world, where does c++
fit? What's the reason that leads to develop in C++ today (unless you
are a C++ veteran, so programming in C++ is justified by the fact that
it's your favorite language)?
You're just asking for a flame war. Search the archives of this group
for twenty discussions of this same question. See also this FAQ from
Bjarne Stroustrup, the creator of C++, and the five or six that follow
for our standard answers:

http://www.research.att.com/~bs/bs_faq.html#Java

Cheers! --M

Jul 14 '06 #2
In article <11*********************@b28g2000cwb.googlegroups. com>,
pl************@gmail.com wrote:
Scenario: programming GUI applications in Windows.

If I need speed, I'll use C. If I need object orientation I'll use C#
(which facilitate the creation of the user interface as well).

So my question is, in today's windows programming world, where does c++
fit? What's the reason that leads to develop in C++ today (unless you
are a C++ veteran, so programming in C++ is justified by the fact that
it's your favorite language)?
(I figure this is a troll, but what the heck...)

a) The need for speed and the "need" for object orientation aren't
mutually exclusive.

b) There is a big wide world out there that doesn't revolve around
programming GUI applications in Windows.
Jul 14 '06 #3

pl************@gmail.com wrote:
Scenario: programming GUI applications in Windows.

If I need speed, I'll use C. If I need object orientation I'll use C#
(which facilitate the creation of the user interface as well).

So my question is, in today's windows programming world, where does c++
fit? What's the reason that leads to develop in C++ today (unless you
are a C++ veteran, so programming in C++ is justified by the fact that
it's your favorite language)?

Thanks,
If we restrict the argument to .NET here, given the choice I personally
would choose C++/CLI, which is probably just about mature enough by
now. This gives me everything that yer C#s and VB.NETs do in terms of
ease of knocking together a UI, plus I get the full expressive power of
C++. And I can write "unmanaged" code for speed if I need to (unlikely
in a UI, but anyway). The commercial reality however is that it is
unlikely to displace C# for mainstream Windows development.

Jul 14 '06 #4
Daniel T. wrote:
(I figure this is a troll, but what the heck...)
Hi Daniel,

I'm sorry if the question seemed trollish. But I'm not a troll, I'm
just trying to evaluate what languages I should spend my nights on :-)
a) The need for speed and the "need" for object orientation aren't
mutually exclusive.
That's a very good point. I'm wondering though if there is any real
difference of speed between C++ .NET applications and C#.NET given that
they both generate IL code.
Can I create an application that uses unmanaged C++ for speed and
managed C++ for the graphical part?
b) There is a big wide world out there that doesn't revolve around
programming GUI applications in Windows.
I agree. However in the question I've limited the scope on purpose,
because the type of applications that I'm going to develop will be
mathematics tools (hence the need for speed for crunching numbers) and
they will be GUI tools on Windows.

Thanks in advance.

sunrise

Jul 14 '06 #5
tragomaskhalos wrote:
If we restrict the argument to .NET here, given the choice I personally
would choose C++/CLI, which is probably just about mature enough by
now. This gives me everything that yer C#s and VB.NETs do in terms of
ease of knocking together a UI, plus I get the full expressive power of
C++.
I see what you mean. I was under the false impression that C# was more
"expressive" than C++, but here you said the opposite. Do you mean C++
is more powerful being slightly more low level? Can I access pointers
in C++ even if I am using managed code?
And I can write "unmanaged" code for speed if I need to (unlikely
in a UI, but anyway).
Ok I like the idea of the combo. Speaking of speed, how does C++
"unmanaged" compares with C for mathematical crunching?
The commercial reality however is that it is
unlikely to displace C# for mainstream Windows development.
Why is this the case. Is it because Microsoft pushes more C#, because
the language is easier than C++ or for some other reason?

Thanks in advance.

sunrise

Jul 14 '06 #6
plasticsunrise wrote:
I'm sorry if the question seemed trollish. But I'm not a troll, I'm just
trying to evaluate what languages I should spend my nights on :-)
We frequently get questions asking to compare closely related things on
merit. Cross-posting to C++ and Java "I heard that Java is faster" will
work wonders there! No worries.
That's a very good point. I'm wondering though if there is any real
difference of speed between C++ .NET applications and C#.NET given that
they both generate IL code.
Can I create an application that uses unmanaged C++ for speed and managed
C++ for the graphical part?
Write code in the language most convenient for the programmer. That would
be a language such as Ruby, with dynamic typing and block closures. (You
may notice the languages pimped by the big companies all suck, hence
languages that earn a following _without_ Daddy Warbucks helping them tend
to rock...)

When you actually find out what's slow, port that to un-managed C++.

Learn both languages, so you _can_ port.
I agree. However in the question I've limited the scope on purpose,
because the type of applications that I'm going to develop will be
mathematics tools (hence the need for speed for crunching numbers) and
they will be GUI tools on Windows.
Exactly. Here's a number cruncher:

http://www.zeroplayer.com/cgi-bin/wiki?TestFlea

Click on a green bar.

The high-level part of that program is written in Ruby. That's the source
in the parchment area to the right. The screen shot on the left is a C++
program that hosts a Ruby interpreter. This runs the Ruby command, and
dispatches a series of commands to a back-end renderer. The program
supports both OpenGL (shown) and POVray. Both of those are written in a C
language.

--
Phlip
Jul 14 '06 #7
On 14 Jul 2006 08:50:37 -0700, pl************@gmail.com wrote:
>Scenario: programming GUI applications in Windows.
If I need speed, I'll use C. If I need object orientation I'll use C#
(which facilitate the creation of the user interface as well).
So my question is, in today's windows programming world, where does c++
fit?
Nowhere, except for maintaining now 'legacy' MFC (ATL, ...)
applications.
>What's the reason that leads to develop in C++ today (unless you
are a C++ veteran, so programming in C++ is justified by the fact that
it's your favorite language)?
On the Windows platform the future belongs to C#.NET. With the slow
but steady decline of MFC C++ will also disappear there.

Best wishes,
Roland Pibinger
Jul 14 '06 #8
Phlip wrote:
The high-level part of that program is written in Ruby. That's the source
in the parchment area to the right. The screen shot on the left is a C++
program that hosts a Ruby interpreter. This runs the Ruby command, and
dispatches a series of commands to a back-end renderer. The program
supports both OpenGL (shown) and POVray. Both of those are written in a C
language.
This may be interesting. I'm a Ruby programmer, but as you said, for
mathematical crunching is not suitable. I'll consider it.

Jul 14 '06 #9
pl************@gmail.com wrote:
tragomaskhalos wrote:
If we restrict the argument to .NET here, given the choice I personally
would choose C++/CLI, which is probably just about mature enough by
now. This gives me everything that yer C#s and VB.NETs do in terms of
ease of knocking together a UI, plus I get the full expressive power of
C++.
I see what you mean. I was under the false impression that C# was more
"expressive" than C++, but here you said the opposite. Do you mean C++
is more powerful being slightly more low level? Can I access pointers
in C++ even if I am using managed code?
Yes C++ is more powerful being more low-level, but my point was it's
also more powerful because it has "advanced" things like templates and
RAII that allow you to code more succinctly and expressively; "smarter"
rather than "faster" if you like. By contrast I can't think of a single
feature of C# that could be considered as making it more expressive
than C++.
Wrt pointers in managed code, you can do certain things in both managed
C++ and C#, but this is necessarily constrained by the runtime.
And I can write "unmanaged" code for speed if I need to (unlikely
in a UI, but anyway).
Ok I like the idea of the combo. Speaking of speed, how does C++
"unmanaged" compares with C for mathematical crunching?
Endless debate about this; but there should be no difference if you use
C++-as-a-better-C, and even pure C++ mechanisms like polymorphism and
exceptions in reality only add a tiny overhead.
The commercial reality however is that it is
unlikely to displace C# for mainstream Windows development.
Why is this the case. Is it because Microsoft pushes more C#, because
the language is easier than C++ or for some other reason?
Historically - ie in the DNA days - using C++ for UI development and
indeed for COM development was not for the fainthearted, and most of
the time VB6 did an adequate job. This "fear of C++" has continued into
the .NET world, and the original "C++ with managed extensions" that M$
brought out did nothing to alleviate this. C++/CLI solves most of the
problems, but it's too late, C# has become established. And to be fair
C# is still easier than C++ for your average Joe developer.

It's also worth noting that in their eagerness to market C#, M$ spread
their own fog of FUD over C++. For example a lot of rubbish was/is
talked about the alleged "superiority" of generics over templates, some
of which could be read on MSDN.

Jul 17 '06 #10
tragomaskhalos wrote:
Yes C++ is more powerful being more low-level, but my point was it's
also more powerful because it has "advanced" things like templates and
RAII that allow you to code more succinctly and expressively; "smarter"
rather than "faster" if you like. By contrast I can't think of a single...
Thanks for your insightful comments.

sunrise

Jul 19 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Paul Rubin | last post by:
As what must be penance for something or other, I'm needing to release a Python app for use under Windows XP. Please be gentle with me since I'm a Un*x weenie and the only thing I've had much...
2
by: Christopher W. Douglas | last post by:
I have an MSDN subscription, and have all versions of Windows Server 2003 available. I have been programming in Visual Studio .NET 2002 in Windows XP and 2000, and I am setting up a new machine...
7
by: Al Wilkerson | last post by:
In regards to getting a job, do you guys feel theer is more of a demand for Windows .Net development or Web .Net development? Also, which language is more in demand VB.Net or C#, or is it more...
9
by: John Eric Hanson | last post by:
My company is considering a development path in which we develop code on 32 bit Windows machines to run remotely on 64 bit Linux machines. What could go wrong?
3
by: Chris Dunaway | last post by:
A quick scan of the group did not immediately reveal an answer to my questions so here goes. First let me describe my app and then I'll ask the questions. I am writing a Windows Forms App (not...
10
by: Mark | last post by:
Are there any known issues with developing ASP.NET web applications directly on Windows 2003 Server running VS.NET 2003 Pro, SQL Server client tools, and using VSS for source control? Essentially...
0
by: Charles Leonard | last post by:
I am having yet another issue with Windows Server 2003. This time, the web service (a file import web service) appears to run except for one odd message: "ActiveX component can't create object". ...
8
by: JimS | last post by:
In my environment we are using DB2 UDB for Windows for development and DB2 UDB for z/OS for production. In DB2 UDB for z/OS uniqueness of columns that permit nulls may be enforced with a unique...
3
by: rkausch | last post by:
Hello, I'm performing some research to determine the feasibility of developing a Windows Service (see http://en.wikipedia.org/wiki/Windows_Service for the specific definition of "service" to which...
20
by: macca | last post by:
Hi, I just started a new web developer job (my first actually) and the machine they gave me to use is a Mac. Two days in and I'm running a Win XP environment on my Mac at work (using VMWare), ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.