473,839 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# vs. C++

I don't want to start a war but why would I choose one over the other?
First and foremost I need to keep in mind marketability of the skill and
the future of the language.

I'm getting the feeling I'll be moving from VB to one or the other. I
have some say on which but perhaps not the final decision. I have used
C and C++ a little bit years ago. I have no experience in C#. I don't
expect it to be that difficult but I hate remembering the idiosyncrasies
of too many languages so I'd like to pick one C# or C++ and make the
right choice.
Jun 27 '08
151 4297

"Andre Kaufmann" <an************ *********@t-online.deha scritto nel
messaggio news:eA******** ******@TK2MSFTN GP04.phx.gbl...
RFOG wrote:
>En 21/06/2008 06:39:43, MC <fo************ **@www.ai.uga.e du.slash.mc>

And actually it is impssible to buid an OS in Java or in a .NET languge.

What about Singularity and Cosmos ?
I think that those are *experimental* stuff, not commercial OSes, available
in shops to buy.

The "real" things (Windows, GNU/Linux, Mac OS X OSes) are written in C
and/or C++.

Jun 27 '08 #41
Giovanni Dicanio wrote:
"Andre Kaufmann" <an************ *********@t-online.deha scritto nel
messaggio news:eA******** ******@TK2MSFTN GP04.phx.gbl...
RFOG wrote:
>En 21/06/2008 06:39:43, MC
<fo************ **@www.ai.uga.e du.slash.mc escribió:
And actually it is impssible to buid an OS in Java or in a .NET
What about Singularity and Cosmos ?

I think that those are experimental stuff, not commercial OSes,
available in shops to buy.
But it is possible, and it could well be that it is done, also
commercially, one day.

Rudy Velthuis http://rvelthuis.de

"The artist is nothing without the gift, but the gift is nothing
without work." -- Emile Zola (1840-1902)
Jun 27 '08 #42
Arne Vajhøj wrote:
Rudy Velthuis wrote:
It could. And I am sure it will.
But new mainstream OS's are rather rare. I think the newest
must be Linux from 1991.
I would call Linux from 1991 experimental too. At least I remember it to
be a huge experiment to get it up and started ;-).
Jun 27 '08 #43
Daniel James <wa*********@no spam.aaisp.orgw rote:
In article news:<#U******* *******@TK2MSFT NGP03.phx.gbl>, Hendrik
Schober wrote:
>IMO these to paragraphs contradict each other. C makes it a lot
easier to write bad, crashing code, than C++ does.

No, if you really /want/ bad, crashing, code you can write it just as
easily in C++ as in C (it might be a bit harder in C#, but you can
still do it).
I wasn't talking about Macchiavelli.
("C++ tries to guard against Murphy, not Machiavelli.")

Sp******@gmx.de is never read
I'm HSchober at gmx dot de
"I guess at some point idealism meets human nature and
explodes." Daniel Orner
Jun 27 '08 #44
In article news:<87******* *************** ************@mi crosoft.com>,
Alvin Bruney [ASP.NET MVP] wrote:
Why is it more powerful and more flexible? I thought you could write
'unsafe' code in C#.
Don't confuse flexibility with lack of safety -- you can have the one
without the other.

Why is C++ more powerful than C#? Because you can do more things with
it, in more ways. C# is designed to support the "Object Oriented"
paradigm (or, more strictly, to provide a plugin replacement for Java
-- which is an almost religiously 'pure' OO language) but C++ is a
multi-paradigm language -- it can "do OOP", but it can be used to
implement other designs as well.

The single most glaringly obvious example of what I mean is that you
can't do template metaprogramming in C#, but there are others.


Jun 27 '08 #45
In article news:<48******* *************** *@news.sunsite. dk>, Arne
Vajhøj wrote:
But new mainstream OS's are rather rare. I think the newest
must be Linux from 1991.
Symbian OS is newer -- first released (as EPOC32) in 1997.

It is written in C++, albeit using a rather odd dialect (forced upon it
in part by the quality of the GNU cross-compilation toolchain for ARM
at the time it was written, and partly by certain in-house coding
styles at Psion).

Jun 27 '08 #46
In article news:<48******* *************** *@news.sunsite. dk>, Arne
Vajhøj wrote:
If you teach C++ to 50 students, then you may get 10 great
programmers and 40 that swear never to try and program again.
I'd call that a positive result! Certainly better than getting 50
mediocre programmers.

Jun 27 '08 #47
In article news:<Lo******* *************** ********@earthl ink.com>,
Michael D. Ober wrote:
Huh? Our entire telecommunicati ons industry is written in C and C++
and C++ is still the way to go for embedded systems.
Not quite ... Ericsson's telephone exchange software is written in
Haskell, for example. They claim that it could not be written to run so
efficiently in C or C++.

Jun 27 '08 #48
Arne Vajhøj wrote:
Cholo Lennon wrote:
>"Arne Vajhøj" <ar**@vajhoej.d kescribió en el mensaje
news:48******* *************** *@news.sunsite. dk...
>>Nick wrote:
Curious. I wouldn't see C# as fundamentally better for writing
Object-oriented code. I see the two languages as essentially the
same but C# has removed the need for explicit memory management
and a few other house keeping issues
More access levels, interfaces and delegates seems
to me to be features that makes good OOP easier.

Just some clarification: In C++ you have interfaces (abstract
classes) and delegates (std::tr1::func tion or boost::function )

C# also has abstract classes and even though abstract classes can
be used instead of interfaces, then interfaces especially when
combined with the only inherit from one class but implement
multiple interfaces rules really guide users towards good
OOP style.
It's a point of view...
TR1 is fine, but strictly speaking it is not C++ yet (it may
be in 2009 rumors say).
Well, some compilers are distributing partial tr1 implementations and function
is included. BTW boost::function (in which std::tr1::funct ion is based) has many
years and is widely used in modern C++ code / production code.

Cholo Lennon

Jun 27 '08 #49
Arne Vajhøj wrote:
Hendrik Schober wrote:
>MC <fo************ **@www.ai.uga.e du.slash.mcwrot e:
That is a good point. Object-oriented programming wasn't mature when C++ came into use. There is a lot of bad C++ code in the
world, and C++ makes it easy to write bad code and create programs that crash.

I think C will outlive C++. C is going to continue to be a good language for small routines where performance is paramount. For
such things, I find myself writing "C-barely-plus-plus," which is C with slight use of the C++ extensions. [...]

IMO these to paragraphs contradict each other. C makes it a lot
easier to write bad, crashing code, than C++ does.

Since C++ support practically all of C then ...
...if C++ wouldn't do so much to make it easy to write
better, safer code, my above statement wouldn't make
sense. Yes. Your point?
Jun 27 '08 #50

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

Similar topics

by: William C. White | last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using cURL? Our website is hosted on a shared drive and the webhost company doesn't installed additional software (such as cURL) on the server because of that. Our site will have an SSL certificate next week, so I would like to use AIM instead of SIM, however, I don't know how to send data via POST over https and recieve data from the Authorize.net server over an https...
by: Albert Ahtenberg | last post by:
Hello, I don't know if it is only me but I was sure that header("Location:url") redirects the browser instantly to URL, or at least stops the execution of the code. But appearantely it continues to execute the code until the browser send his reply to the header instruction. So an exit(); after each redirection won't hurt at all
by: James | last post by:
Hi, I have a form with 2 fields. 'A' 'B' The user completes one of the fields and the form is submitted. On the results page I want to run a query, but this will change subject to which field is completed.
by: Ollivier Robert | last post by:
Hello, I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9 system. The link succeeds but everytime I try to run php, I get a SEGV from inside the libcnltsh.so library. 354 roberto@ausone:Build/php-4.3.2> ldd /opt/php4/bin/php libsablot.so.0 => /usr/local/lib/libsablot.so.0 libstdc++.so.5 => /usr/local/lib/libstdc++.so.5 libm.so.1 => /usr/lib/libm.so.1
by: Richard Galli | last post by:
I want viewers to compare state laws on a single subject. Imagine a three-column table with a drop-down box on the top. A viewer selects a state from the list, and that state's text fills the column below. The viewer can select states from the drop down lists above the other two columns as well. If the viewer selects only one, only one column fills. If the viewer selects two states, two columns fill. Etc. I could, if appropriate, have...
by: Albert Ahtenberg | last post by:
Hello, I have two questions. 1. When the user presses the back button and returns to a form he filled the form is reseted. How do I leave there the values he inserted? 2. When the user comes back to a page where he had a submitted POST data the browser keeps telling that the data has expired and asks if repost. How to avoid that? I tried registering all POST and GET vars as SESSION vars but
by: inderjit S Gabrie | last post by:
Hi all Here is the scenerio ...is it possibly to do this... i am getting valid course dates output on to a web which i have designed ....all is okay so far , look at the following web url http://www.mis.gla.ac.uk/biquery/training/ but each of the courses held have maximum of 8 people that could be
by: Jack | last post by:
Hi All, What is the PHP equivilent of Oracle bind variables in a SQL statement, e.g. select x from y where z=:parameter Which in asp/jsp would be followed by some statements to bind a value to :parameter I dont like the idea of making the SQL statement on the fly without binding parameters as I dont want a highly polluted SQL cache.
by: Sandwick | last post by:
I am trying to change the size of a drawing so they are all 3x3. the script below is what i was trying to use to cut it in half ... I get errors. I can display the normal picture but not the results of the picture half the size. The PHP I have installed support 1.62 or higher. And all I would like to do is take and image and make it fit a 3x3. Any suggestions to where I should read or look would be appreciated.
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.