Greg Bernhardt
12-23-01, 01:49 PM
With Java becoming very popular and C# on the rise, how soon will C++ become obsolete?
|
|
View Full Version : Is C++ obsolete? Greg Bernhardt 12-23-01, 01:49 PM With Java becoming very popular and C# on the rise, how soon will C++ become obsolete? Chagur 12-23-01, 03:44 PM Considering that a lot of the older languages, Cobalt, Fortran, ADA, and naturally Basic, even Lego if I'm not mistaken, are still around. I would imagine it will be a while. Take care :) Porfiry 12-23-01, 03:52 PM Very soon, I hope. The thing is, new programmers coming out of university programs are no longer being trained in C++. At least at my university, Java is the language of choice for most development, largely because of the benefits of the platform independence and the OO paradigm it embraces. In fact, in the first 4 years of classes, I learnt more Scheme than C++. I now hear that the C-based 1st and 2nd year courses are now being done in Java (though, that's not too significant since those courses usually involved assignments of < 50 lines of code and are a mere introduction to procedural programming). In the programming area I'm involved in -- namely Mac / open source -- the C language is still in wide use. In fact, C is a very elegant language. It's interesting that the lifespan of C will probably be longer than that of C++. I predict C# and Objective-C (a different OO-extension of C based on Smalltalk) will become the primary development languages on Windows and Mac respectively. Porfiry 12-23-01, 03:56 PM Considering that a lot of the older languages, Cobalt, Fortran, ADA, and naturally Basic, even Lego if I'm not mistaken, are still around. I would imagine it will be a while. With the exception of Basic (which is technically a scripting language), is any new development being done in those languages? I'd argue that the relevance of a language is more related to new development as opposed to maintenance of existing code. Chagur 12-23-01, 04:32 PM Do believe there is still new development going on in ADA, but I may be wrong. Have a good one, Dave... kmguru 12-23-01, 09:51 PM We have a very large VSAM/COBOL/CICS system that we are ready to replace. I have not decided if I will go for J2EE or go for Forth or use one of the Websphere types. I am still reviewing. I am looking for a very high volume and high speed transaction with a mirrored synched database for house keeping... I would like to keep the main frame but may be go for a Linux box. Any suggestions? Rick 12-24-01, 01:46 AM Our ehm ehm...Ms-Windows series is all programmed in C++.so the extinction depends upon Microsoft.:D C will NOTdegrade and become extinct.most of the network programming,like routing algorithms are implemented in C,Linux is based upon C.C is a greeeat language,it is very flexble and all purpose,except that it is not OOPS . bye! Greg Bernhardt 12-27-01, 12:07 AM i've just picked up a C# book, i hope it become popular like wildfire kmguru 12-27-01, 12:55 PM My speculation is what MS is trying to do is add some Java type functionality to C#. But most importantly, they are trying to add a communication layer such that it will be easier to read an web page from the program itself and communicate single transactions within an internet app including the database similar to communication between Office apps through a .Net architecture. I could be wrong...we could be years off to get there... Jay Renalsds 12-28-01, 02:07 AM I'm interested in programming and don't know what language to pick. I started c++ but im no longer sure if it is the language for me. I did research on the web and didn't find anything particularly useful. I plan to program software applications and I'm looking for a powerful, not necessarily easy to use language. All my sources say c++ is the best choice but none of them had anything about c# or java. Rick 12-28-01, 05:58 AM Jay, My Opinion:start with C...no i am not crazy to tell you this,but when you start and do it thouroughly you"ll equipped to program OS,write TSRs,viruses,make Dbases(large ones).not only this but you can also write network algorithms,write code in assembly language!!!!Linux is designed in C today,all those stupid routers and firewalls(most of them)get their brains from C,c is most comprehensive language to be ever made and yet i dont know why many people call it primitive...choice is completely yours... bye!;) kmguru 12-28-01, 02:07 PM I agree with Zion, if you are good in C++, you can do it with any new language comes along. Mind you, any new language will be higher up from assembly level. Rick 12-30-01, 12:41 AM But remember... concepts are more important,once you grasp BASIC concepts of C,all you"ll need is a little creativity and SDLC knowledge...and then you"ll become LINUS TORVALDS one day,with your own OS called JAIUX...:D... Rick 12-30-01, 12:50 AM There's a bit of problem with JAVA...(which is why I think CGI scripts may be a better solution)JAVA scripts are downloaded and they run on client machine instead of running on hosts,so it gives a bit of insecurity... bye! kmguru 12-30-01, 12:43 PM Yes, that is only true for Java Script but not for Java as in J2EE (I think). Porfiry 12-30-01, 03:04 PM There's a bit of problem with JAVA...(which is why I think CGI scripts may be a better solution)JAVA scripts are downloaded and they run on client machine instead of running on hosts,so it gives a bit of insecurity... Well, there are 3 separate Java 'scripts' used in web design: 1) JavaScript - this is not at all related to Java, but was just used as a marketing term by Netscape. It's now known as JScript or ECMAScript. This is a pseudo-standard adopted by browser software that allows simple scripting of the browser by embedding the scripts in HTML. 2) Java applets. I think this is what you are referring to. The compiled binary code of the applet is downloaded over the network to the client computer where it is run. However, the security issue isn't there, since the applet is run within a secure execution space that limits destructive access to the local computer (eg. file access, forking of new processes, etc.). 3) You hint at CGI, but neither 1 nor 2 are relevant for CGI scripts. CGI scripting is done at the server side during the HTML-generation stage. Very often the client has no idea if its receiving dynamic or static content. Here Java is also useful. CGI executables can be written in Java and are run on the server side. Of course, CGI executables can be written in any other language since they are just programs that run on the server. sachin 01-08-02, 09:54 AM C is never gonna be phased out of the IT sector. it is a very flexible language & having very strong foundations in C is gonna help the developers.:eek: Chagur 01-08-02, 02:05 PM Able to confirm: New development going on in ADA. Source may not be cited. Take care. :cool: Weitzel 01-15-02, 12:37 PM Porfiry wrote: The thing is, new programmers coming out of university programs are no longer being trained in C++. At least at my university, Java is the language of choice for most development, largely because of the benefits of the platform independence and the OO paradigm it embraces. In fact, in the first 4 years of classes, I learnt more Scheme than C++. I now hear that the C-based 1st and 2nd year courses are now being done in Java (though, that's not too significant since those courses usually involved assignments of < 50 lines of code and are a mere introduction to procedural programming). Scheme, Porfiry? You must be at UBC. :) It's true that they're teaching Java for 1st and 2nd year courses now (at least in our area of the world) but I agree with Chagur: C++ will be around for a while yet. Chagur 01-18-02, 02:40 PM Credit where credit is due: Zion (re.C++) I'm still hooked on BASIC :D Porfiry 01-18-02, 03:02 PM Scheme, Porfiry? You must be at UBC. err, yes, you're absolutely right. :D kmguru 01-18-02, 03:30 PM While helping out my kids COBOL class last semester, I realized, COBOL can come back too...only if the I/O and syntax is improved. Hey, if Apples fancy OS is FreeBSD, anything is possible. Even QDOS or RTDOS can comeback. What we need is a new language (called English) that you could talk to it.... Rick 01-19-02, 11:52 AM Are you talking about 4GLS and 5GLS? bye! Deus 01-19-02, 11:54 AM The thing is, new programmers coming out of university programs are no longer being trained in C++. The bulk of my training in programming has been in C++. I'll graduate in 1.5 years and as far as I know there is no plan to move most of the CompSci courses here to Java. In the programming area I'm involved in -- namely Mac / open source -- the C language is still in wide use. In fact, C is a very elegant language. It's interesting that the lifespan of C will probably be longer than that of C++. I wonder how you came to the conclusion that C will last longer than C++. Anything you can do in C you can do in C++, to my knowledge. Why would C++ die out before C? Especially since C++ provides more ability to be object-oriented than C and everyone is talking about how programming should be object-oriented. I predict that C++, and to a smaller extent C, will be around for quite awhile. A lot has been written in them, and considering that the major OSs are written in C or C++ insures that there will be a need for the languages for some time in the future. Personally, I don't consider Java to be good enough for powerful computing. It's nice to use if you want to distribute one set of files on the web, but it takes too long to compile and execute, and as far as I've seen, there is no way to have a java application compiled into a stand-alone executable that you can just double-click on. Rick 01-19-02, 11:55 AM Somewhere in this forum(sciforums as whole)someone asked once wether machines would be programmers in future... i just learned that Applications of 4GLS is used for such a purpose, all you have got to do is provide relevent data. (*note:this is different from SQL and other query languages.) bye! Rick 01-19-02, 11:59 AM Java, doesnt make use of pointers!!(am i right Porf?) how boring...???!!! bye! Porfiry 01-19-02, 04:10 PM I predict that C++, and to a smaller extent C, will be around for quite awhile. A lot has been written in them, and considering that the major OSs are written in C or C++ insures that there will be a need for the languages for some time in the future. Err.. since C++ is a superset of C, if C++ is around then C is around. But my point is that there are other, better, supersets of C (Objective-C) that are around and just coming into prominence. Also, those programmers interested in non-crippled object-oriented programming will flock from C++ to real object-oriented languages (C#, Java, Objective-C) as their performance overhead becomes trivial (on faster machines). it takes too long to compile and execute, and as far as I've seen, there is no way to have a java application compiled into a stand-alone executable that you can just double-click on. Java is actually quick to compile, simply because it doesn't have to go all the way to machine code. Blame Windows for the double-clicking idiocy. Is there any way to write a normal MFC program that doesn't spew .dlls everywhere on your computer? On Mac OS X, everything app (including Java programs) is a single-file object that can be dragged around like any file. Java, doesnt make use of pointers!!(am i right Porf?) That's a total misconception. The only real use of pointers is as a reference to dynamic memory. In Java, almost everything is a (opaque) reference to dynamic memory. No, you can't traverse a data structure by incrementing a pointer (since the reference is opaque), but I've never done that in reality in C, and it's pretty bad form to do so. Deus 01-19-02, 08:28 PM Err.. since C++ is a superset of C, if C++ is around then C is around. But my point is that there are other, better, supersets of C (Objective-C) that are around and just coming into prominence. Also, those programmers interested in non-crippled object-oriented programming will flock from C++ to real object-oriented languages (C#, Java, Objective-C) as their performance overhead becomes trivial (on faster machines). What I meant was that I think that supersets of C will be used in new development longer than basic C will be. Where do you get the idea that object-oriented programming in C++ is crippled? Just because C++ doesn't force you to program in the OO paradigm doesn't mean that it's crippled. Not everything that needs software will be running a 1GHz processor, you know, so you can't assume that the overhead associated with Java and the like will just disappear because of fast processing. Java is actually quick to compile, simply because it doesn't have to go all the way to machine code. Blame Windows for the double-clicking idiocy. Is there any way to write a normal MFC program that doesn't spew .dlls everywhere on your computer? On Mac OS X, everything app (including Java programs) is a single-file object that can be dragged around like any file. I don't know about MFC, but I know that I can write programs that stand by themselves in C++, and every program I've seen written in Java requires you to have Java to run it. That's like writing QBasic programs, where you need QBasic to run them. :P Besides, you can blame Windows all you want, but if you want to write an application for the bulk of users, you need something they can just double-click on, because the bulk of users out there right now aren't very sophisticated. Rick 01-20-02, 10:38 AM Porf, I have compiled the information from the following site that may clarify...notice about explicit pointers. the above info was taken from the following site: ======================================= http://www.bearcave.com/software/garbage.htm ====================================== Memory Allocation and Garbage Collection True confession time: my web pages serve several purposes. One of these is to act as a notebook that I will have access to where ever I have a computer and an Internet connection. This page is under construction. In the short term the purpose of this page is to provide a draft of an article on memory and to provide links to garbage collection sources. In the longer term I hope to provide a polished article that will be of interest to other software engineers. This page was prompted by J.D. Marrow, who kindly sent me a reference to Hans-J. Boehm's Web page on garbage collection. Dynamically Allocated Data Structures Dynamicly created data structures like trees, linked lists and hash tables (which can be implemented as arrays of linked lists) are key to the construction of many large software systems. For example, a compiler for a programming language will maintain symbol tables and type information which is dynamically constructed by reading the source program. Many modern compilers also read the source program (e.g., parse it) and translate it into an internal tree form (commonly called an abstract syntax tree) that is also dynamically created. Graphics programs, like 3D rendering packages, also make extensive use of dynamic data structures. In fact it is rare to find any program that is larger than a couple of thousand lines that does not make use of dynamically allocated data structures. Problems with Dynamic Allocation To avoid consuming vast amounts of virtual memory and destroying performance through page swapping, many programs that use dynamic allocation also dynamically deallocate memory when the programmer believes it is no longer needed. This leads to a number of problems including: Poor performance. The openGL graphics library supports "display lists" which describe the 3D polygons that make up a shape. A complex scene may have a large number of display lists. Deallocation of a display list, one element at a time, can be very time consuming and can have a large impact on program performance. This can be avoided using a block based memory allocator, where the display list elements are allocated from large memory blocks. When a display list is no longer needed, a pool of blocks can be deallocated. While this technique is effective, designing, implementing and debugging a good block allocator is time consuming. Memory leaks. A memory leak takes place when memory is allocated but never deallocated. A major computer manufacturer had a subtle memory leak in one of the window types for their window system. One group of users would run large test programs over night and then expect to scroll back through the windows buffer. The buffer was not infinite and only buffered a certain number of lines. The software displaying this scrolling buffer had a memory leak. It would recover most, but not all of the memory allocated as the window scrolled. As the test ran over night, the window software used up more and more memory, until the entire virtual memory was consumed. The window would then crash, destroying the test run information the user wanted. Tools like purify where not available at the time and this bug tool a huge amount of effort to track down and fix. Pointers to deallocated memory. When memory is deallocated there may still be pointers in use to the deallocated memory. The deallocated memory will be recovered by the memory allocation system and reused. Since it may now have two pointers to it (e.g., the live pointer to the old deallocated data structure and the pointer to the newly allocated data structure) the program behavior may be bizzare, running correctly sometimes and getting the wrong result in others. Even carefully crafted code written by experienced software engineers tends to suffer from problems with memory leaks and references to deallocated memory. Products like like purify (for UNIX) and BoundsChecker (for Windows NT) are literally worth their weight in gold when trying to track down these errors. Java and Garbage Collection There are a variety of reasons that the Java programming language seems to be popular. Some of these reasons actually involve software engineering issues, rather than hype and religion. Java does not support explicit pointers (which are a source of a lot of complexity in C and C++) and it supports garbage collection. This can greatly reduce the amount programming effort needed to manage dynamic data structures. Although the programmer still allocates data structures, they are never explicitly deallocated. Instead, they are "garbage collected" when no live references to them are detected. This avoids the problem of having a live pointer to a dead object. If there is a live pointer to an object, the garbage collection system will not deallocate it. When an object is no longer referenced, its memory is automaticly recovered. So, in theory, Java avoids many of the problems listed above. The cost, however, is in performance. Automatic garbage collection is usually not as efficient as programmer managed allocation and deallocation. Also, garbage collectors tend to deallocate objects from a low level, which can hurt performance (e.g., deallocating an openGL display list at the element level). There is a rich body of work on garbage collector architecture and garbage collection algorithms (stemming largely from LISP runtime support, which makes heavy use of garbage collection). A lot of this work is aimed at avoiding the more severe pitfalls of garbage collection. C/C++ and Garbage Collection Many garbage collection systems rely on compiler support to help the system determine when a pointer goes out of scope, so the object the pointer points to can be deallocated. However, most C and C++ compilers don't support garbage collection. There are several packages that support garbage collection for C and C++. See, for example, Hans-J. Boehm's Web page on the Boehm-Demers-Weiser conservative garbage collector. Another version of the web page on the Hoehm-Demers-Weiser garbage collector is also available at a site hosted by Xerox PARC. This garbage collector is designed to be a replacement for malloc in C and new in C++. The Web pages also provides a reference list. So far I have not looked into the pros and cons of this software (as I mentioned above, this Web page is still under construction). Pool Allocation In pool allocation, objects are allocated from a pool of large blocks. When a point in the program is reached where this memory is no longer needed, the entire pool can be deallocated at once. For a discussion of pool allocation of C++ objects see Overloading New in C++. Other Web pages Jamie Zawinski's argument for garbage collection vs. ad hoc memory management (or no memory management and memory leaks). The Hoard Memory allocator Hoard is not a garbage collecting allocator. However, it does very fast multiprocessor memory allocation for multithreaded software. Accross multiple processors with a threaded application the authors of Hoard claim that they have very close to linear allocator performance. Hoard would be an excellent platform on which a garbage collecting allocator could be built. Ian Kaplan Last updated, December, 2001 malisha 01-29-02, 06:17 PM No Java is never going to replace C/C++ and neither will C#, no chance. Not unless the new computers of the future will be using java byte code as the native language for the cpu. Java cant access memory directly and it has a slow start up time plus you need the virtual machine just like C#. C and C++ will always be used for time critical applications. Rick 01-30-02, 08:25 AM Exactly,Explicit pointers are not used in Java... bye! sunflow 02-07-02, 02:42 PM Well from c++ and c develops all of our applications, i'm not an expert though i can program but i think that c++ is already obsolete because to do the things that you do simply with Visual c++, or Visual Basic you need a lot of time programming the same things knowing calls to the api windows functions. I have built a software using entirely C and i have sepnt a lot fo time, energy and i have get my mind exausted when after i rebuilt the same thing with Visual Basic, it seemed a game for children. Visual is the future, c is the past Rick 02-08-02, 12:29 AM Design an OS with VB...???? never heard of that.anyway,Joe are you hearing this? they"re what you call the crowd who are doing that... bye! malisha 02-09-02, 06:36 AM Design an OS with VB Hehe thats right, or try to write an embeded system with vb. You cannot directly access memory with any language BUT c/c++ or assembler and i would rather code in c++, hell even c then in assembler. Your thinking of the application world here, yes C# and VB and delphi are ok for that, but dont forget the bios that is built into your mother board needs to be programmed before you can even start writing applications on the comp and that requires C/C++ or assembler. Hell even assembler still has its uses even today. And if speed is of the utmost importance then you will never ever choose C# (because its just like java it needs a VM) java or any other language which needs a runtime. Plus if you code in ansi standard C or C++ your code is relativly(minor changes) portable to other platforms, unlike vb or C# that is why C and C++ will never be obsolete ever, don think in the application world, think in lower levels hardware, i mean without hardware thats working correctly controlled by fast running C code we wont have any use for those other languages because the computer will be just a very expensice paper weight. The only, only way that c and c++ will become obsolete is if they decide that the new processors will run on java byte code or C# bytecode which i think is very unlikely. These applications below are only codeable in C or C++ - real-time systems - operating systems - embedded systems * car electrnoic injection systems * your microwave * fridge * washing machine all either use C,C++ or assembler - games for pc and console * all C++ C and assembler To my knowledge there has never been a game written in java besides those tiny online games. Even those watches you see which can be programed in java have an OS underneath that which is written in yes C /C++ and/or assembler. And this is just a few i can think of right now, there are more. Java is nice for writting applications that need to span multiple systems with different os but have you ever ran a windows application written in java, compare the speed at which it runs to a normal c++ program and you will see the difference. Yes C++ is a little harder then some of the other languages and its 00 is not as nice as java's (most people say) but thats a matter of opinion, you can program C in 00 style if you wanted even though it isnt an 00 language it depends who's using the language really, but the truth is there is no other language which can do EVERYTHING possible on a computer but C/C++ and assembler. Bowser 02-14-02, 11:10 AM I spent a year learning C++ and MFC. I still fall back on C, however. I think C/C++ will be around for many years. I know people who still earn a living writing code in FORTRAN and PASCAL. Greg Bernhardt 02-15-02, 09:36 AM how could you make a living learning pascal? good grief Rick 02-15-02, 10:29 AM That Good Grief expression...made me do this: 1.)hahahahahahhahahahahahahahahahahahahahahhahahah ahahahahahahahahahahaaaaaaaaaaaaaaa...!!!! 2.)Fell down...my chair... bye! Ender 02-22-02, 07:07 PM Currently at my HIghschool, they are offering C++ and an AP C++ calss. I think that yes the launage will surly die out. It won't we for a long time. Once many software developers decide to not program anything in it, then the everyday programmer will have to say weither it is dead or not. Once all the major corperations have finished develpoing software, then the individual programmer will have a much broader market, and it will thrive with coders. But sonn it will die out. GRO$$ 03-13-02, 02:06 AM Im in HS. I'm talking Honors C++ this year, 1st year its availible. In 2 years the course is planned to be replaced by Honors Java ;) Teacher says that Java is more for Application Development while C++ is business-oriented. Just my 2 cents. |