Thread: Moving from C to C++

  1. #46
    Registered User
    Join Date
    Jun 2004
    Posts
    201
    Quote Originally Posted by Ancient Dragon
    I admit there are some features of c++ that I hate and never use -- templates is one of them. Sure, I'll use a few from stl but I don't bother to write my own or use template from other sources (at least not that I know of). By the time I figured out how to write the template I could have had the whole program written! But that doesn't mean the whole c++ language is something to be ignored and used only as a toy.
    when you work with other programmers you often have no choice. One is cooler than the other by knowing more C++ features so he writes a ........load of partially specialized templates.....and then he leaves the company.....and then there's a bug in it. happy debugging, or on our platform where we dont have a source debugger....happy code reading

  2. #47
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    Quote Originally Posted by Laserve
    when you work with other programmers you often have no choice. One is cooler than the other by knowing more C++ features so he writes a ........load of partially specialized templates.....and then he leaves the company.....and then there's a bug in it. happy debugging, or on our platform where we dont have a source debugger....happy code reading
    if you are less knowledgeable than an other developer, you should aspire to his level, not drag him down to yours.

    I work with mostly C programmers in an embedded environment. They're excellent in their field, but I can safely say I'm more knowlegdeable about C++. That's ok, 'cos they know way more than me about embedded development. I don't expect them to maintain my code if I leave, anymore than I could maintain theirs. Does that mean I limit my use of C++ to a minimum? Of course not. I use the language features I deem appropriate (including partially specialised templates). If I leave, the company should find another senior C++ engineer to replace me, not expect other developers to absorb the load.
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

  3. #48
    Registered User
    Join Date
    Jun 2004
    Posts
    201
    Quote Originally Posted by ChaosEngine
    if you are less knowledgeable than an other developer, you should aspire to his level, not drag him down to yours.

    I work with mostly C programmers in an embedded environment. They're excellent in their field, but I can safely say I'm more knowlegdeable about C++. That's ok, 'cos they know way more than me about embedded development. I don't expect them to maintain my code if I leave, anymore than I could maintain theirs. Does that mean I limit my use of C++ to a minimum? Of course not. I use the language features I deem appropriate (including partially specialised templates). If I leave, the company should find another senior C++ engineer to replace me, not expect other developers to absorb the load.
    becoming a senior in C++ engineer takes way longer than other environments. They are harder to find and therefore cost more money and all that for a language that tries most to compete in the field of application programming. It would cost a company way less if they use a more modern application programming language.
    Let's suppose a not so senior engineer is the only option and he has to fix code from a previous senior who liked to use all C++ features cos thats the cool thing to do. (dont even try to deny it ^^) debugging that code takes longer and therefore costs more money. When a language is a bit more restrictive in redundant features, people dont get the chance to abuse them.

  4. #49
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    When a language is a bit more restrictive in redundant features, people dont get the chance to abuse them
    So, by that theory everybody should write html code because its the most restrive language with the least features I can think of.

  5. #50
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    HTML has features now? ORLY?

  6. #51
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    Quote Originally Posted by Laserve
    becoming a senior in C++ engineer takes way longer than other environments. They are harder to find and therefore cost more money and all that for a language that tries most to compete in the field of application programming. It would cost a company way less if they use a more modern application programming language.
    Let's suppose a not so senior engineer is the only option and he has to fix code from a previous senior who liked to use all C++ features cos thats the cool thing to do. (dont even try to deny it ^^) debugging that code takes longer and therefore costs more money. When a language is a bit more restrictive in redundant features, people dont get the chance to abuse them.
    That is orthogonal to your point. I have already stated several times that I don't think C++ is the best language ever, I don't think ANY language is the best for all situations.

    I don't believe that C++'s features are "redundant". Of course, they can be abused, but you can abuse basic if you want to.

    A senior engineer should be replaced by a senior engineer. That's true in ANY language. Besides, one of the principles of OO is seperation of interface from implementation. I may very well write a complicated partial specialised template, but if it is contained behind a well-documented interface, even a junior engineer should be able to use it. I use boost.python a lot. I've looked at the code and I confess it's written by C++ developers a quantum level beyond my ability (for now ). I couldn't have written it, but I can certainly use it.

    And yes I do deny that I use C++ features because it's "cool". C++ has never been cool. If I wanted to be cool, I'd use Java or C# (not necessarily bad languages, but certainly have a lot more "cool" factor).
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Moving Average Question
    By GCNDoug in forum C Programming
    Replies: 4
    Last Post: 04-23-2007, 11:05 PM
  2. moving median function
    By supermeew in forum C Programming
    Replies: 0
    Last Post: 05-04-2006, 02:37 PM
  3. Replies: 4
    Last Post: 01-16-2006, 05:58 PM
  4. 3D moving
    By bluehead in forum C++ Programming
    Replies: 9
    Last Post: 04-02-2005, 05:46 AM
  5. Simple program i cant get (dot moving)
    By Lupusk9 in forum C++ Programming
    Replies: 4
    Last Post: 09-14-2004, 08:04 PM