The creator of the C++ programming language claims there has been a backlash against some of the newer programming languages such as Java and C#, with developers moving back to using C++.
The creator of the C++ programming language claims there has been a backlash against some of the newer programming languages such as Java and C#, with developers moving back to using C++.
And when was the last time you really programmed in Lisp?
Never? Thought so!
The biggest problem i see with Lisp is the lack of standardised socket / thread / system libraries.
The language rocks! Beats the shit out of anything designed since except for Smalltalk.
Everything C#, Java and *hyped language of the day* are doing today has allready been done better by Lisp and Smalltalk.
At least C++ has something unique; abstractions without compromising on performance.
And why aren’t more programmers using these languages today, you ask?
I’d say it’s because they bought into C/C++ at a time when performance was king, Lisp and Smalltalk were simply too slow to be useful at the time.
They later fled screeming to Java and C# when machines became faster and are now deserting in droves to Python and Ruby.
The funny thing is that that the next logical step in terms of freedom of expression and convenience after Python and Ruby is Lisp and Smalltalk. And as if that isn’t enough, todays heavily optimised implementations of Lisp and Smalltalk often out-performs C#/Java/Python and Ruby.
Cobol is, in my opinion, a completely different story. Lock it up, throw away the keys and the world will be a better place
How are you doing automatic memory mgmt in C++?
They’re called smart pointers.
Microsoft abandonded it when they deadended the MFC framework…Microsoft walked away from C++ and MFC, primarily because the C coders at Microsoft got tired of wrapping their api’s in classes
You should know what your talking about before posting. MS has neither abondoned MFC nor C++. VC++ 2003 featured a brand new edition of MFC (7.1) as well as .Net bindings (managed extensions). Further, roughly half of what’s in .Net is just a wrapper around Win32. Further still, every major MS app is written in C++; even popular apps reportedly written “in .Net” tend to be C++ apps that host the .Net runtime. All this is verifiable and Herb Sutter (MS lead architect) has publicly stated so many, many times. So, to sum up, next time you feel like shooting off your mouth, please at least do A LITTLE research (hint: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dn… ) so you come off like a complete idiot.
> The funny thing is that that the next logical step in terms
> of freedom of expression and convenience after Python and
> Ruby is Lisp and Smalltalk.
I’m not sure folks will take that step though. Besides “freedom of expression”, programmers also care about ease of use (and also familiarity). Rather than providing the perfect programming environment, if you have a pretty simple environment that does mostly what you need it to do, and isn’t too hard to understand, *that’s* what folks are probably going to use, no?
While both Java, C# and C++ have their strengths, they also each have their weaknesses.
Personally, I find the D Programming Language [ http://www.digitalmars.com/d/index.html ] to be the most promising thing to replace C++.
The site offers a comparison between many different C-based OO languages such as C++, C#, Java, and Objective C, and shows the difference between them.
Personally, I don’t see D replacing Java, since Java is a whole platform (ie GUI libraries, and all), but at the same time D seems to be like the _perfect_ replacement for C++ (which Java isn’t).
i’m language independent. i suck in all of them, but am happy using pretty much any of them. but i’m just a PLC guy, so i don’t really get exposed to regular programming languages except through school. PC programming is a lot more fun, but with PLC’s you get to start controlling physical world stuff, so i’m hooked.
i gotta give this thread credit. there was some of the regular holy war stuff, but there was actually some interesting insight and debate mixed in here and there.
But I wish it wasn’t. Having worked on huge C++ projects where you sift through thousands of lines of horrific code to fix one bug is mind-numbing. Templates always seemed like lack of faith in OOP (why use it if you short-circuit it with a template, hmmm). C++ classes, in real life, often become mega-classes where each class is like a little program littered with member variables that might as well be globals in such a morass.
C++ is not as portable as C. Example: the Xerces XML parser is C++ (originally written in Java) but has a C++ port for those that want performance (you know; liberal with speed and frugal with memory). They have to limit the features of C++ they use to make sure they can port to stuff like AIX, etc. C does not have this problem.
C++ was used for Perl 6 (why, Larry, why have you forsaken us?) with the VM (Parrot) in C. Trolltech (re: KDE) is all C++ which is one of the reasons Gnome is not (psst, it’s C).
C should remain the core language for serious programming and teaching. Everything else may be faster to code in (VB, Java), cuter (python), has neat tools (Eclipse) but there is nothing other than assembler that can get every penny’s worth of power out of a CPU (gcc, baby).
As far as safety, I would not want to ride in a Java-controlled aircraft. Java and C++ are sneaky, they do things behind your back like touch the heap with stack vars (STL strings in C++) or snatch CPU cycles from me (garbage collection in Java). All I would need is for the gc to start up on final approach just because the landing does not seem to need all that power. I mean it is “fast enough”, right? No way!
In the Java – “things that make you go ‘hmmm'” department. There was a project to port TCL/Tk (the unsung father of Java AWT, and also a Sun project) to Java (Jacl). I always thought this project was insane. TCL runs on more platforms than Java ever will. Now it’s bastard son, Jacl (as in cloven hooved Jackel), is less portable than TCL.
Hmmm.
C++ is dead, long live C.
JAVA is a very nice language to allow fairly competent programmers to be very productive. It is today what COBOL was twenty years ago.
Great programmers use as many languages as they need to get the job done, and done well. Their code can blow away ordinary code. One project I did involved Java, VB, HTML, Python, and C. And the competition is fighting in house over whether to write it all in C# or Java. Oh well.
Schools should be teaching differences between langs. and the whole computer science angle instead of teaching you to write in zillion langs. I mean, I would expect that once you graduate you can create and write your own programming lang and compiler to interface with the machine. THAT’s what science in computer science stands for. They should probably split it into two 1)computer science 2)computer user. Then let folks decide whether they want to be app devs or researchers.
Have anyone of you actually read the C# specs? I did and found the lang. to be as complex as C++. I guess people are throwing in .net as well which is unfair to C++. Let’s discuss langs. not apis/platforms.
Now, someone asked how he’s suppose to know what lang. is best for the job. Well, google/wiki and downloading the lang and trying it out. That’s the only way to find out. Little bit of action on your part that’s what is required. Learning/research doesn’t stop when you get out of school. I mean, if you took this programming job just for making money then you’re certainly in the wrong field. If you took it because you were born to be programming then you’re in the right field. It’s just like any other job. You do it the best when you love it and suck at it when you hate it. If you hate it your motivation goes down to zero and then the game is over.
why not use pascal? it’s more secure than C,C++. OO is well defined. freepascal compiler is very fast.
#3: it is not the native language of any platform (C++ on windows, C on linux, etc)
The Win32 API is in C, not C++. MFC is bolted on C++, but requires its own runtime library and just makes calls to the C equivalents.
C is better for systems development, and mature OO languages like Delphi or Java are better for application development. C++ is being squeezed in at both sides, I can’t see it lasting very long.
And C++ is quite a poorly designed language, the number of ways a programmer can trip himself up – often in non-obvious ways – is frightening. It’s the very last language I would use to teach programming to new students.
Unlike a lot of posters, I think OO should be taught quite early on, to get students into that mindset (OO is here to stay, and I’m happy that it is). However I am concerned that students don’t spend much time mucking about with the low-level details of a system. I figure everyone should be taught C, even if it’s near the end of a course. At the very least knowing how manual memory management works is important.
“Templates always seemed like lack of faith in OOP (why use it if you short-circuit it with a template, hmmm)”
“Unlike a lot of posters, I think OO should be taught quite early on, to get students into that mindset”
OO is only one programming technique among a lot of others. It’s useful. Not every single thing should be done with it, though.
OO is a very vague term, anyway.
For some, it’s not OO if method calls and stuff aren’t resolved dynamically at runtime, while for others it is.
There are people who say that writing result = matrix1 * matrix2 in c++ is not OO, whereas writing result = matrix1.multiply( matrix2 ) in java is, even though the difference is purely syntactic.
I’ve seen people say that spirit (a neat parsing toolkit which uses generic programming and operator redefinitions to let you express grammars with an EBNF syntax directly in c++) is a good OO approach of parsing, even though I’d disagree on the fact that it puts any emphasis on objects.
Regardless, it’s all a matter of using the right tool for the job. OO is good, and so are a lot of other programming technique that overlap so much with OO that they could be considered OO if your definition of it is wide enough. Generic programming and OO are pretty complimentary.
But I agree that it’s a way of thinking that should be taught early on.
The people here whining about memory management in C and C++ should know that there are runtime analysis tools to locate hard-to-find memory errors and resource leaks, such as IBM Rational PurifyPlus and Compuware BoundsChecker.
I’m surprised with this thread. It hasn’t really degenerated into a religious flame war of Java vs C++, or X vs Y, or whatever. Most posters here are taking the “Use the right tool for the job” stance, which is great.
C++ is great for systems programming, especially large systems that need to be broken down into smaller components for managability. C++ is also great for GUI toolkits, as well as video games.
C is great for systems level programming, especially compilers, operating systems, device drivers, and embedded programming.
Java is great for large, complex server side web applications, in the form of J2EE and it’s vast APIs. Java gives cross platform capability, as well as multi vendor support.
C# and VB.Net are great for rapid development of Windows apps. ASP.net is good for server side web apps.
Perl is great as a Unix administration tool, web development, and as a general glue language.
Python is great for rapid development of smaller apps, web apps, prototyping, and easy desktop apps. Python is also a good Unix scripting tool.
PHP is great for server side web scripting, where the massive APIs of J2EE are not needed.
Fortan is creat for scientific apps.
RPG is great for AS/400 apps.
Milage may vary with the above descriptions.
C and C++ have a great history, and indeed have a great present and future. C and C++ are the languages of choice for systems programming, and there are presently no challengers for that domain. Higher level languages like Java and .Net rule for enterprise dynamic apps, but underneath the runtimes are compilers, virtual machines, the OS, and the OS API, all of which have to written in C or C++. So the higher level stuff depends on the lower or mid level stuff.
Give me a break, I’ve heard so much ridiculous slamming of OOP that I just wanna puke.
0) Java/C#/C++ have their place. You don’t use Java or C# for mission-critical systems programming. And you don’t use C++ to build a database-driven, multithreaded, network-aware client/server web application (well, unless you are masochist). So C++ will be around as long as someone wants to write a robust systems application, and Java or its next-generation replacement (whatever that may be) for everything else.
1) C++’s main purpose is OOP, period. So don’t whine about Java/C#’s OOP and then praise C++. It just shows you don’t know anything about either.
2) OOP is a Good Thing(TM). It actually makes programming simpler for newbies. How difficult is it for someone to understand an “object”? It’s very simple — name something in life that isn’t an object. You can’t.
3) C++ is better than Java because of Java’s GUI API? Please! There can’t possibly be any more comparing of apples and oranges than this. If you’re gonna compare languages, compare languages, not GUI APIs (which C++ doesn’t have by default, btw).
4) Java is bad because it’s not native to any platform? This is inherently stupid. Limiting yourself to any single platform ties your language to an OS and in some cases, hardware, which is not a Good Thing(TM). However, in cases where you absolutely need native binaries on a system that you know inside and out, use common sense and develop the app in C/C++ or even assembler.
5) “Use language X; it’s better than Y” … just stop it. There are trade offs with every language/platform. Each has its place. Visit monster.com/dice.com and see for yourself. While you guys all babble on infintely about how bad a language is, companies ignore you and see the strengths of each. And speaking of those sites, Bjarne still has alot of ground to cover … Java is MUCH more in demand than either C++ or C#.
>1) C++’s main purpose is OOP, period. So don’t whine
>about Java/C#’s OOP and then praise C++. It just shows
>you don’t know anything about either.
“C++ is a general purpose programming language with a bias towards systems programming that
is a better C
supports data abstraction
supports object-oriented programming
supports generic programming.”
from bjarnes side, note how it ONLY “supports” OO and Generics, and Generics seem to be the more important part, if you look at eg. the standard library
>2) OOP is a Good Thing(TM). It actually makes programming
>simpler for newbies. How difficult is it for someone to
>understand an “object”? It’s very simple — name
>something in life that isn’t an object. You can’t.
addition, multiplicataion, a lot of mathematical algorithms are best expressed in procedural languages…
traversing of tree structures is often more naturally expressed in functional languages…
some mathematical proves are best expressed in prolog…
use the best tool for the task at hand, and no OO isnt always the best tool …
Right tool for the right job, end of story.
http://caustictech.typepad.com/caustictech/2004/12/perspective_or_….
Some of the X sucks, Y sucks BS in this thread is unbelievable, anybody that dismisses a single language out of hand is either inexperienced or a moron.
JAVA may be the current trend for computer science,
but granted, C/C++ is still THE language mostly used in electrical/computer engineering field.
embedded system alone is enough reason to learn C/C++ rather than java.
and I admit I am an electrical engineer and not pro in software coding,
but from my limited experience, C/C++ seem to be much faster/efficeint than java.
lastly,
until Windows dies, C++ will be around still, and sorry kids, windows will still be the most common OS a decade from now in my opinion.
C++, C#, VB and python are the main languages we use here. (coveo.com)
C++ is the language for software development. We are now moving more and more towards C# for web interfaces (with VB declining). Python has long been our language for some internal testing and build automation.
Learning Java in a high school class and implementing it in the real-world is a bit different.
Standard C++ has benefited from open source with more GUI libraries and component libraries. Standard C++ can almost be used easily for any type of solution without having to buy into a product line. I think that Standard C++ is well suited for independant programmers, although there is a lack of freely available documentation and tutorials. There is a lot of non standard C++ out there because of the cost of learning Standard C++. I think that the cost of learning is Standard C++’s obsticle, and one that will never be circumvented.
The real question is how well can Python be used as a solution, or Python in combination with C or non standard C++. Can Python (or some other definition) be both a sophisticated language and a large framework, and at the same time open source. If so, than there is no better choice, unless you like to give away profit.
You wrote:
While both Java, C# and C++ have their strengths, they also each have their weaknesses.
Personally, I find the D Programming Language [ http://www.digitalmars.com/d/index.html ] to be the most promising thing to replace C++.
The site offers a comparison between many different C-based OO languages such as C++, C#, Java, and Objective C, and shows the difference between them.
Personally, I don’t see D replacing Java, since Java is a whole platform (ie GUI libraries, and all), but at the same time D seems to be like the _perfect_ replacement for C++ (which Java isn’t).
Scratch off Objective-C since the site doesn’t do a comparison.
Compare D with Objective-C and Apple’s Frameworks. I’d love to see the comparison.
basic baby……sweeeet! BASIC ROCKS!