DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Page 3 of 3 FirstFirst 123
Results 31 to 37 of 37

Thread: C++ or C#

  1. #31
    Ted Guest

    Re: C++ or C#


    "Mike Grim" <wgrim@siue.edu> wrote:
    >Stop trolling; obviously no one here cares to hear it.


    You really should read the whole thread. If no one cared to hear it, it
    was a pretty good thread.

  2. #32
    Jim Guest

    Re: C++ or C#


    "Floyd" <fhamberg@mail.ru.> wrote:
    >
    >"Ken" <terryken@erols.com> wrote:
    >>
    >>There is currently a push in my office to switch from C++ to C#. I know,
    >>Iknow, Iím all against it too. But I need some hard fact to show the powers
    >>that be why we should not go with C#. Can someone please help with some
    >>articles that compares the two?
    >>
    >>Thanks for any help.
    >>Ken

    >
    >There aren't such args. You can't compare diferent languages, see Bjarne
    >Stroustrup's answer for who those like to compare languages...
    >
    >If your office switches for C# , what you gonna do? get fired and try get
    >other job? Come on...
    >
    >Face it , time doesn't stop...
    >moreover did you try write an web service or a multi-thread application

    with
    >pure c++?
    >
    >New languages and libraries came to fill these blank spaces...
    >
    >and btw C# isn't so hard to learn. :)
    >
    >regards
    >floyd.
    >

    C# or C++, the decision should be based on the application you write. For
    us, we are using C++ with Visual C++ 6.0. Our application is COM based,
    our user interface is done in HTML and javascript, and we communicate between
    the components using XML. C# could probably do here, but we were worried
    about its shortcomings. (This application is an upgrade of a previous application
    to manage our instruments and that was written in C++.)

    Al Stevens in the July 2002 issue of Dr Dobbs Journal presents an interesting
    article comparing C# and C++. This article looks at the differences in inheritance.
    C++ allows for multiple inheritance where C# does not. (Even managed C++
    does not allow multiple inheritance.) Using his example, if I want to model
    a business's use of its automobiles, assuming that they are leased or owned
    by the business, we would classify them as either "LeasedCar" or "OwnedCar"
    objects. Each would derive from a "Car" class, which in turn would derive
    from a "Vehicle" class. But the "OwnedCar" also derives from an "Asset"
    class. Al feels that in order to model the "OwnedCar" object in C#, we would

    1. Need to join the "Vehicle" and "Asset" classes together where this
    joined class will derive from asset. This can lead to duplications in code
    that must be maintained (for both LeasedCar" or "OwnedCar" objects.)
    2. Change the "Asset" class to an interface. But this means the "OwnedCar"
    object must provide implementations of all of the functions and data members
    that the "Asset" interface requires.

    Also, I find your discussion on Java vs. C++ interesting. Does Java really
    require bigger (more expensive) computers? This may be fodder for my argument
    to stay with C++. Another concern that I have with Java is that only one
    company is controlling it. This seems rather ambiguous since their decisions
    can be guided by their own self interests. (This is not good for the development
    community as a whole.) (The same can be said about Microsoft's controlled
    languages, libraries, and operating systems -- like .NET, COM, and Windows.)
    I prefer letting the community at large control the direction of the programming
    language where everyone's input counts.

    Keep the information coming.

    James Lonero.


  3. #33
    ralph Guest

    Re: C++ or C#


    "Jim" <james.lonero@hii-hitachi.com> wrote:
    >
    >"Floyd" <fhamberg@mail.ru.> wrote:
    >>
    >>"Ken" <terryken@erols.com> wrote:
    >>>
    >>>There is currently a push in my office to switch from C++ to C#. I know,
    >>>Iknow, Iím all against it too. But I need some hard fact to show the

    powers
    >>>that be why we should not go with C#. Can someone please help with some
    >>>articles that compares the two?
    >>>
    >>>Thanks for any help.
    >>>Ken

    >>
    >>There aren't such args. You can't compare diferent languages, see Bjarne
    >>Stroustrup's answer for who those like to compare languages...
    >>
    >>If your office switches for C# , what you gonna do? get fired and try get
    >>other job? Come on...
    >>
    >>Face it , time doesn't stop...
    >>moreover did you try write an web service or a multi-thread application

    >with
    >>pure c++?
    >>
    >>New languages and libraries came to fill these blank spaces...
    >>
    >>and btw C# isn't so hard to learn. :)
    >>
    >>regards
    >>floyd.
    >>

    >C# or C++, the decision should be based on the application you write. For
    >us, we are using C++ with Visual C++ 6.0. Our application is COM based,
    >our user interface is done in HTML and javascript, and we communicate between
    >the components using XML. C# could probably do here, but we were worried
    >about its shortcomings. (This application is an upgrade of a previous application
    >to manage our instruments and that was written in C++.)
    >
    >Al Stevens in the July 2002 issue of Dr Dobbs Journal presents an interesting
    >article comparing C# and C++. This article looks at the differences in

    inheritance.
    > C++ allows for multiple inheritance where C# does not. (Even managed C++
    >does not allow multiple inheritance.) Using his example, if I want to model
    >a business's use of its automobiles, assuming that they are leased or owned
    >by the business, we would classify them as either "LeasedCar" or "OwnedCar"
    >objects. Each would derive from a "Car" class, which in turn would derive
    >from a "Vehicle" class. But the "OwnedCar" also derives from an "Asset"
    >class. Al feels that in order to model the "OwnedCar" object in C#, we

    would
    >
    > 1. Need to join the "Vehicle" and "Asset" classes together where this
    >joined class will derive from asset. This can lead to duplications in code
    >that must be maintained (for both LeasedCar" or "OwnedCar" objects.)
    > 2. Change the "Asset" class to an interface. But this means the "OwnedCar"
    >object must provide implementations of all of the functions and data members
    >that the "Asset" interface requires.
    >


    IMHO: Multiple inheritance is evil!

    There is little reason for its existance, except to resolve some highly specialized
    problems usually dealing with low-level generic stuff - iostream being a
    good example. The make cute self-updating packets also, but there are very
    few practical applications for MI in "higher-level" programming and design.


    I know they gave points for knowing and using MI in college. I am also aware
    diamond diagrams can really be impressive - especially in color with lightly
    airbrushed shadows around the boxes - to management and fellow programmers.
    But in the real world they are a huge waving Red Flag - with neon highlights
    - that something is seriously wrong with your design.

    But in this case it is worse because even MI doesn't fit. A business rule
    may define a "car" as an "asset", but a car is not a kind of asset, and an
    asset is not a type of car. As far as an "interface" is concerned I assume
    you are talking about a "has a" relationship - now I once headed west with
    all my assets piled in my VW, but I don't think that is quite what the BR
    is about. (Or maybe it is - how big is your company?)

    Anyway, the very fact you are beating yourselves to death on this should
    be a very big clue that you are surround by screaming signs - "Wrong Way",
    "Turn Around Now", "There be Monsters there", "Step away from the car..."


    >Also, I find your discussion on Java vs. C++ interesting. Does Java really
    >require bigger (more expensive) computers? This may be fodder for my argument
    >to stay with C++. Another concern that I have with Java is that only one
    >company is controlling it. This seems rather ambiguous since their decisions
    >can be guided by their own self interests. (This is not good for the development
    >community as a whole.) (The same can be said about Microsoft's controlled
    >languages, libraries, and operating systems -- like .NET, COM, and Windows.)
    > I prefer letting the community at large control the direction of the programming
    >language where everyone's input counts.
    >
    >Keep the information coming.
    >
    >James Lonero.
    >



  4. #34
    barknee@westrew.com Guest

    Re: C++ or C#


    >Al Stevens in the July 2002 issue of Dr Dobbs Journal presents an interesting
    >article comparing C# and C++. This article looks at the differences in

    inheritance.
    > C++ allows for multiple inheritance where C# does not.


    That is not true. C# does not allow for mulitple "implementation" inheritance.
    Multiple interface inheritance is perfectly fine.


    >Al feels that in order to model the "OwnedCar" object in C#, we would
    >
    > 1. Need to join the "Vehicle" and "Asset" classes together where this
    >joined class will derive from asset. This can lead to duplications in code
    >that must be maintained (for both LeasedCar" or "OwnedCar" objects.)



    > 2. Change the "Asset" class to an interface. But this means the "OwnedCar"
    >object must provide implementations of all of the functions and data members
    >that the "Asset" interface requires.
    >


    How about making Vehicle - IVehicle and have OwnedCar derive from IVehicle
    and Asset??? OwnedCar is still a vehicle and can still use Asset has an
    containment relationship.

  5. #35
    Christopher P. Kile Guest

    Re: C++ or C#


    "Ken" <terryken@erols.com> wrote:
    >
    >There is currently a push in my office to switch from C++ to C#. I know,
    >Iknow, Iím all against it too. But I need some hard fact to show the powers
    >that be why we should not go with C#. Can someone please help with some
    >articles that compares the two?
    >
    >Thanks for any help.
    >Ken


    I have read all the message in this thread to date, and amidst all the tongues
    of flame forking back and forth some issues have been touched on but not
    truly dealt with. I would like to address those, and use them to answer
    your question, Ken.

    First, I would like to share an anecdote. Back in 1994, an old boss of mine,
    who had been a software entrepeneur at a time (1980) when BASIC was THE language
    for microcomputers and ten different versions of CP/M had to be supported
    (in addition to PCDOS). He had switched to C around 1985 because his programming
    staff had made the case that:

    1. C allowed larger, faster programs to be built using the same machine
    resources.
    2. Despite the higher learning curve of C, once it was learned C was just
    as easy to use (to the trained user) as any other language.

    There were a couple of drawbacks:

    1. BASIC could be debugged interpretively on the client machine at the client
    site if there was a problem; this was not true of C.
    2. By its very isolation from direct contact with machine resource, the
    bugs that could be produced in BASIC were usually easy to localize, and thus
    to correct. C, on the other hand, could be used to produce bugs which literally
    could not be located except, for all intents and purposes, by accident.

    He allowed a prototype of his flagship product to be built in C, and it worked.
    Furthermore, his programmers became more creative and productive in C than
    they had ever been in BASIC, because C allowed a programmer expert in its
    arcane vocabulary to be very productive indeed. BUT it was harder to find
    acceptably skilled C programmers than it was to find BASIC programmers, because
    the cost of expertise was higher than many programmers were willing to pay.

    If the learning curve of C was steep, the learning curve of C++ was like
    the Himlayas. The addition of object orientation, including inheritance
    and operator overloading, ON TOP OF the C language which was, is, and always
    will be the basis of C++ insured that this would be so. But C++ is even
    more richly rewarding to the expert programmer than C because of those very
    additions.

    One didn't always have the benefit of ample quanitities of skilled C++ programmers
    available, however. In 1994, when he began a new product line for benefits
    administration that he wanted to be based on the Windows operating system,
    he solicited my opinion as to what development environment to use - he did
    say, however, that he leaned toward C++ as the development language. I told
    him to build it in Access because: 1. Access programmers were cheaper than
    C++ programmers (now that Access uses VBA, it is still true); 2. Access programmers
    are more plentiful than C++ programmers (also still true); 3. If you had
    to replace an Access programmer, his replacement was more likely to be able
    to understand his predecessor's code in less time than a new C++ programmer
    would be able to understand HIS predecessor's code (unless he was a C++ guru).

    Now, at this time he was building his developer base from scratch (I had
    moved on to another employer and did not wish to go to work full time for
    him again, and his previous entrepeneurial effort had failed). If he had
    already had a staff of skilled C++ programmers, I would have told him to
    go with C++ - no matter how difficult programming the Windows applications
    would've been, once the Windows interface was mastered his programmers would
    be extremely productive.

    Why would your current employer want to retrain you in another language when
    you are already expert in C++? What time will be saved? What money will
    be saved? Make it a business problem, and the solution presents itself -
    at least to a businessperson.

    Regards

  6. #36
    Danny Kalev Guest

    Re: C++ or C#



    "Christopher P. Kile" wrote:
    >
    > Why would your current employer want to retrain you in another language when
    > you are already expert in C++? What time will be saved? What money will
    > be saved? Make it a business problem, and the solution presents itself -
    > at least to a businessperson.


    While I agree with your conclusion, the rationale seems a bit
    questionable. After all, according to this line of reasoning, your boss
    and his team would still be using BASIC until this very day. The
    reluctance towards changes is understandable and justifiable. After all,
    there's no reason to risk existing working applications and move to an
    untested technology that is still evolving, and which incurs additional
    expenses in terms of training, porting, and what most vendors "forget"
    to tell you -- stronger hardware. Still, changes in the IT domain are
    unavoidable. So the best approach, IMO, is to proceed prudently with the
    technology and embrace technologies that have been used and proven
    satisfactory in the real world. C# for example isn't there yet. Java, 7
    years after its release, is only starting to look mature and robust
    enough. Think of those naive bosses who thought it would be a good idea
    to jump on that wagon in 1996. All the code that was written then is
    useless today. Who uses RMI? And what ever happened to AWT? What about
    the wacky stream I/O libraries? Not to mention the lack of important
    features such as reflection. Languages take time to mature; before you
    switch to a new language, let other enthusiasts be the guinea pigs. In
    many cases, you will discover that the technology that was supposed to
    be the best thing since sliced bread has died already. DHTML anyone?

    Danny
    >
    > Regards


  7. #37
    ralph Guest

    Re: C++ or C#


    Danny Kalev <dannykk@inter.net.il> wrote:
    >
    >
    >"Christopher P. Kile" wrote:
    >>
    >> Why would your current employer want to retrain you in another language

    when
    >> you are already expert in C++? What time will be saved? What money will
    >> be saved? Make it a business problem, and the solution presents itself

    -
    >> at least to a businessperson.

    >
    >While I agree with your conclusion, the rationale seems a bit
    >questionable. After all, according to this line of reasoning, your boss
    >and his team would still be using BASIC until this very day. The
    >reluctance towards changes is understandable and justifiable. After all,
    >there's no reason to risk existing working applications and move to an
    >untested technology that is still evolving, and which incurs additional
    >expenses in terms of training, porting, and what most vendors "forget"
    >to tell you -- stronger hardware. Still, changes in the IT domain are
    >unavoidable. So the best approach, IMO, is to proceed prudently with the
    >technology and embrace technologies that have been used and proven
    >satisfactory in the real world. C# for example isn't there yet. Java, 7
    >years after its release, is only starting to look mature and robust
    >enough. Think of those naive bosses who thought it would be a good idea
    >to jump on that wagon in 1996. All the code that was written then is
    >useless today. Who uses RMI? And what ever happened to AWT? What about
    >the wacky stream I/O libraries? Not to mention the lack of important
    >features such as reflection. Languages take time to mature; before you
    >switch to a new language, let other enthusiasts be the guinea pigs. In
    >many cases, you will discover that the technology that was supposed to
    >be the best thing since sliced bread has died already. DHTML anyone?
    >
    >Danny
    >>
    >> Regards



    Good point.

    Especially since I have it from a very good source that within 5 years all
    programming will be done with Maisie and F#.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center