Is C++ getting too complex for today's technology?

This is a discussion on Is C++ getting too complex for today's technology? within the C++ Programming forums, part of the General Programming Boards category; As most humans do, we think in an object-oriented mind. Due to today's complexity, usually .NET/Java would fit in this ...

  1. #1
    Software engineer
    Join Date
    Aug 2005
    Location
    Oregon
    Posts
    283

    Exclamation Is C++ getting too complex for today's technology?

    As most humans do, we think in an object-oriented mind. Due to today's complexity, usually .NET/Java would fit in this area. Like ASM had to switch to C, C had to switch to C++ due to complexity later. Is C++ about ready to be too complex today?

    After noticing the amount of productivity I get for using these languages, I look back at C++ and wonder why it's so obscure to do even the simplest of things. For instance, in DirectX, you're looking at 200-400 lines of code just for a video on the screen. Managed DirectX is around 4 lines. Knowing in 10 years, C++ is going to be too complex for our increasing technology. For some education, C++ did develop Java and .NET from the core, usually in it's compiler & VM. Due to this, we can use Java/.NET to acheive greater power. Due to today's complexity, I'm glad they built these tools. Companies even see a need for these languages to decrease debugging time, and focus more on getting a product done less than the time they thought.

    Graphics are always improving, new techniques can be done, and we're reaching the stage of mobile & web technologies. Just think of programming windows with C++. It's a nightmare! Now think of using C++ for every major cell phone. It's too complex, and developing compilers for each one takes time and money. So, for starters with C++'s complexity, is Microsoft/Sun doing us a favor?

    I'm a general programmer, so I don't care about taking sides, nor care to start one now. As I've said before in many development forums, programming is not politics. I find a concern here, and I wish to listen to your helpful insight. With that being said, thanks!

    dxfoo

  2. #2
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    I disagree with this. C has been around since the early 70's, and it's still quite popular. Reducing code size drastically probably means you're losing performance, capabilities, or both. Assembly still has it's place, like in a game engine where assembly is often used to give a performance boost. C++ is the same way. It will always have its place despite languages which are less complex.

  3. #3
    Registered User
    Join Date
    Sep 2005
    Posts
    2
    the key are libraries, not the language itselft in my opinion.

    you need a language to actually "talk" with the pc in the most direct, to print a bitmap for example, thus we will always need a low level language.

    C++ can act as both low and high level. You can make libraries with C++, now you got nice libraries, you got da PoWa of high level C++

  4. #4
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    assembly, C and C++ are all still alive and quite well, than you very much. Just because the hardware may be getting more complex does not mean the demise of those languages any time soon -- probably not in my lifetime anyway. MS-Windows is difficult to learn, and X11/Motief for *nix is even more difficult. But after you are over the learning curve (about a year or so of intensive training) its not really that bad.

    You use the programming tools for the job you want to do. I wouldn't think of writing a web application with assembly, c or c++. HTML (and variants) for browser clients. I don't know C# so can't comment. Nor would I use HTML or java to write PC business applications, c++ does the job nicely.

  5. #5
    Nonconformist Narf's Avatar
    Join Date
    Aug 2005
    Posts
    174
    Reducing complexity--in this case --is all about the level of abstraction. Java, .NET, and the various scripting languages have a higher level of abstraction than C++, so they're simpler to the end programmer. As Dark-MX implied, a library that handles something at a very high abstraction will make a solution in C++ seem simple. The difference is in hiding the complexity behind an easy to use interface. If you take apart Java or .NET, you'll find a lot of complexity that was previously hidden from you by the abstractions.

    So is C++ getting too complex for today's technology? I think a better question is "Can C++ adapt to today's more complex problems?" From past experiences, I think so because C++ has been very good at changing to meet the needs of us programmers. There's no reason why we can't step up to the plate and make C++ a better language for todays technology.
    Just because I don't care doesn't mean I don't understand.

  6. #6
    Software engineer
    Join Date
    Aug 2005
    Location
    Oregon
    Posts
    283
    Thanks for the great replies. I agree about C++ being alive and well. In fact, it's interesting that even Java can do native calls on C++ code if needed. I'm sure .NET has a way for this, as well.

    Personally, I had to think about what my weak areas are. I tend to have a harder time learning a language. It's complexity in DirectX is enough for me to fall dead. I assume I have a simpler mind - not really able to deal with algorithms that take complex code. My mind thinks OO, and maybe I'd benefit myself more of using C# and all the tools it can apply with (MDX, ASP.NET, GDI+, BlueTooth, etc.). I also enjoy platform languages. I have a variety of solutions that can be done with the same language. Something like that excites me. C++ is C++, and indeed, it has thousands of tools.

    My C++ teacher told me that his company switched from C++ to VB.NET because easier development time. I notice a ton of application developers are using .NET these days. A friend of mine even uses C# for ASP.NET these days, and hasn't touched C++ for a few years. I see a shift in the next language generation, but of course, C++ code will always exist. Heck, there's enough of it to maintain and upgrade for several of years, even C code. But since my mind works at a slower pace, maybe I should stick to C#. I can already tell that C++ is fine to learn, but the tools used for it is too complex already for me. Maybe I should switch, but I'll continue to read your input. I guess this is more about me than C++, but I know that software companies are switching to it for some obvious reason.

  7. #7
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Quote Originally Posted by dxfoo
    TIt's complexity in DirectX is enough for me to fall dead.
    I know that feeling very well. Don't think the complexity of DirectX is common throughout all c++ programming! I looked at it, very briefly, then quickily and intentially completly forgot about it.

    As for game programming -- there are tools out there that let you write complex games without programming even one line of code!

  8. #8
    Software engineer
    Join Date
    Aug 2005
    Location
    Oregon
    Posts
    283
    Where's the fun in that? I can at least remember what I did in Managed DirectX. I can remember myself saying I can be productive finally and get products out. I think that's worth going for in C#. From ASM to C, even C was abstract to what ASM was doing, and programmers liked it I feel the same from C++ to C#. I don't really like the portability constraints, but it's enough using Windows as a platform for income.

    Edit: I thought this was an interesting blog entry. It cleared my mind by just knowing that each language is useful in their own way. He quotes, "In summary, C++ and C# are both great languages that fulfill different needs, and the success of one need not come at the expense of the other."

    http://blogs.msdn.com/texblog/archiv...02/424588.aspx
    Last edited by dxfoo; 09-08-2005 at 10:37 PM.

  9. #9
    Registered User
    Join Date
    Nov 2002
    Posts
    491
    You sound in dire need of reading http://www.paulgraham.com/power.html

  10. #10
    Geek. Cobras2's Avatar
    Join Date
    Mar 2002
    Location
    near Westlock, and hour north of Edmonton, Alberta, Canada
    Posts
    113
    Quote Originally Posted by dxfoo
    Thanks for the great replies. I agree about C++ being alive and well. In fact, it's interesting that even Java can do native calls on C++ code if needed. I'm sure .NET has a way for this, as well.

    hmm.. I thought .NET had at least as good support for C++ as it does for C#.

    However, I know little about it. I do know though, that anything that looks simple just has a whole lot of complexity hidden underneath it. Take a wheel for instance; the thing only works because it's made of an extremely large number of atoms and things, all working together to hold it in one piece, and for that matter, you wouldn't even *need* a wheel if it weren't for all the friction and gravity getting in your way. It looks simple.. you can use it without knowing how complicated it really is... but it's a lot more complicated than programming is.
    James G. Flewelling
    Rgistered Linux User #327359
    Athabasca University Student (BSc. CIS)

    http://catb.org/~esr/faqs/smart-questions.html
    http://catb.org/jargon/

    http://www.ebb.org/ungeek
    ---GEEK CODE---
    Version: 3.12
    GCS/IT/M d- s+:++ a-->->>+>++>+++>? C++++>$ UL++>++++$ P++>++++ L++>++++$
    E W++ N o? K? w++(--)>--- O? M? V? PS--(---) PE Y+ PGP? t 5? !X R(*)>++
    tv-->! b++(+++)>++++ DI? D+++(---)>++++$ G e*>++$ h++>*$ r!>+++ y?
    ----/GEEK CODE----
    upd: 2005-02-11

  11. #11
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    You're thoughts seem to me to be a bit too narrow. Certainly, GUI programming in C++ is challenging and time-consuming. It is doable in C++, but in many cases (not all), there are much better tools available to do the job -- as you said, why write 400 lines when you could write 4? But, you have to consider that applications for mobile devices and the web are perhaps the most visible, but by far not the only applications. I'd (usually) much rather write a scientific simulation in C++ which has the capabilities of abstraction to make development and maintenance more tractable than something like FORTRAN or C, while still maintaining rather reasonable speed and resource management.

    Cheers
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  12. #12
    Software engineer
    Join Date
    Aug 2005
    Location
    Oregon
    Posts
    283

    Talking

    At the beginning, I thought C++ would "fade out" due to newer technologies and the user's increasing expectation of GUIs. However, out of this dicussion, I found that C++ will always have its stay in where it excels in.

    I'm going to choose C# because I wish to persue the client end of GUI design, mobiles, the web, and side in game programming. Since I can admit that I'm rather a simple-minded programmer, I'd probably excel more in C# than C++. I want to build simple games up to RPG's that have a Runescape feel (www.runescape.com). Much like this screenshot I found...

    http://farm.tucows.com/2004/08/etern...ds/screen3.jpg

    C# can handle this. I don't expect it to handle Everquest 3, nor will I "think" I can do it, because I won't, and I can't. I know .NET's limits, and I'm proud enough to say that I can do what I need to do. And I'd love to use .NET for a software position after college. I think at the end, we use what we're most comfortable in. For me, that has to be C#. Thanks for the discussion. I see that you have a C# section! I'll be around there if I have any questions.
    Last edited by dxfoo; 09-08-2005 at 10:52 PM.

  13. #13
    Registered User
    Join Date
    Jul 2003
    Posts
    450
    I think an old fashioned tecnique would work well to solidfy your knowledge of C++.

    Write the code on paper first (pseudo). Proofread, create flow charts for your functions and use UML for OO stuff.

    Try not to use refrences unless you are stuck.

    This advice I need to do myself. Call me a noob hipocoder.

  14. #14
    Software engineer
    Join Date
    Aug 2005
    Location
    Oregon
    Posts
    283
    Btw, I'm not very worried about the level of abstraction that C# gives. But who knows: in three years, C# may be so "advanced", it'd be like this!

    using system.awesomegameheaderfromc#;
    C#main
    AwesomeGame();

    I'd be a little worried at this point. Anyway, thanks for the discussion. Time to read some more
    Last edited by dxfoo; 09-08-2005 at 11:41 PM.

  15. #15
    Dump Truck Internet valis's Avatar
    Join Date
    Jul 2005
    Posts
    357
    I agree with above statements, it's the calls and libraries that make something easy to use, even in ol' C there is nothing stopping you from making a very easy to use set of calls for gui stuff. It wouldn't be overly difficult to package the DirectX setup code to two or three calls, or a set of calls for window stuff (GLUT for example).

    I don't actually see a lot of special language constructs C# offers that C++ doesn't, it does offer much protection for those inexperienced in or hating memory manipulation; it also simplifies a few things such as headers, dereferencing, etc. but that isn't a radical difference. If I am missing something (I'm not a C# programmer) please point it out, I'm always interested to learn.

    Different languages are different.

Page 1 of 4 1234 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Complex Number Class
    By Sephiroth1109 in forum C++ Programming
    Replies: 15
    Last Post: 12-12-2007, 04:46 PM
  2. Why am I getting 'undelcared identifier' ???
    By Bill83 in forum C++ Programming
    Replies: 2
    Last Post: 02-15-2006, 01:00 PM
  3. arithmetic operator friend functions
    By linucksrox in forum C++ Programming
    Replies: 7
    Last Post: 02-06-2006, 11:39 PM
  4. 2 am complex double conversion woes
    By Roule in forum C++ Programming
    Replies: 1
    Last Post: 10-14-2004, 03:53 PM
  5. Problem from texbook
    By Unregistered in forum C++ Programming
    Replies: 5
    Last Post: 07-26-2002, 05:55 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21