C++ antiquated.

My dad was talking to his workmate and his workmate was in a colledge class. He asked if he could use C++ for his database thing. His teacher said that C++ was antiquated. Do you think so?

P.S. That guy needs a new teacher.

http://sourceforge.net/softwaremap/trove_list.php?form_cat=160

Based on that I would say it’s not antiquated.

C++ may lack some features that newer languages have and it may be harder to learn than some newer languages but nevertheless it still has a strong status.

What does his loser teacher recommend he use instead?

Undoubtedly some useless language like Ruby*. Have fun trying to create software with high data throughput without making your Sun serverfarm stall. %|

*And I’m not talking about using Ruby for the web, that’s whole different issue.

In the hands of capable programmers, C++ is still one of the premiere lanquages. It’s extremely quick and robust.

JAVA and C#. A language that is worthless (from what I heard), and a language that has a whole bunch of stuff taken out so you can’t make programs, unless you pay $250,000 (probibly).

I personally don’t like C++. I find solving programming problems hard enough without having to waste loads of time learning the language. I see programming as a way to get a job done and if the syntax is confusing or the language structure is hard to figure out then I choose a language that gives me less problems.

I generally prefer scripting these days to avoid compile times but for performance, I’d go with pure C. I’m glad Renderman shaders use C code. So that’s it for me - C or scripting (python, shell scripts, applescripts).

I also heard that C++ was antiquated but I do think the teacher may be being biased. C++ is not the most elegant language - sort of a hack to add object functionality to C and it’s one reason why Apple prefer Objective-C as it is a true object language and is a simple extension to C - I don’t like it for the syntax though. C# is sort of the proprietary Windows equivalent to Objective-C.

I read that Bill Gates said his biggest mistake in designing the NT operating system was adopting C++ for the graphics coding, the resulting code took years longer to write than it should have and ran terribly slow.

Not sure if that’s true but as Stroustrup says, “C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, it blows away your whole leg.”

Although C++ is high performance, if you use it in massive projects, you could easily take away that advantage with bad code, especially with the language being inherently difficult to use.

I it’s a breeze to code in C++. It takes a while to get over the learning curve (cough Blender cough) but once you do, it’s great. I couldn’t imagine working on a huge project with anything else.

I always try to learn Java and usually an hour or so into, I ask myself… Wait, why am I doing this? What do I need Java for?

Bottom line:
To answer your question, I think the teacher is a moron.

osxrules posted some common (and good) arguments he has encountered against C++… but the people who propogate them to us are often (1) biased and (2) second-rate programmers. To be fair, few people have been properly taught, and/or fail to use, good programming practice. In real life people usually get along with a less-than-elegant understanding of good coding structure.

Not to insult anyone here, but looking over the Blender source is, as often as not, a case in point. For example, you can instantly recognize Martin’s code when compiling Blender by the fact that it produces no compiler errors. Looking at the code itself it is well organized. He uses clear and legible names for variables and functions. While sparsely documented (and this is my only complaint against him) it is better documented than the majority of Blender’s source and it is documented in a meaningful way.

(As a side note, poor coding practice is the major reason for software troubles today, such as bloat, “bugs”, systems failures, cost overruns, maintainance industries, etc.)

C++ is a third-generation, object oriented language. Because of its basis in the C-syntax, and conscious effort to maintain generic programming features, it can be seen as a hack over C. But it is not. Lexagraphically, it is nearly identical to many “cleaner” OO languages. C and C++ simply are two separate and distinct languages.

You’ll not learn Java or C# any easier than you will C++. Both require an understanding of underlying OO structures and concepts. The only difference is syntactical in implementation.

I can’t defend Bill Gates in his comments. The failure isn’t so much choice of language as it is the way he runs his company. While it is true that development could possibly have been improved by making a better choice in language, he simply cannot blame the tool for the failure. His company, like most who follow him, have a bad programming culture which fails to integrate against good practice in favor of good capitalism. Development cycle length is dependant primarily on a well-defined and carefully ordered plan --not on the language used for implementation. Likewise, speed issues result from a failure in implementation. C++ is and remains one of the fastest languages out there --underneath it operates in the same relative way as all other OO languages, and its block structure and succinctness are a well-documentented advantage. (BTW, these are not just my opinions, but the opinions of experts in the field of program design and managment.)

Again, I agree with osxrules’s last statement’s first two clauses, but I disagree with the last. Believing C++ to be inherently difficult to use belies a prejudice that is taught --and the basis of all programming language religious wars.

I personally prefer some other languages over C++, simply because they do some things automatically that I must do explicitly in C++. That said, the choice in language is more properly a choice in matching the language to the job, not in personal preference.

Henrymop, tell your friend that so long as he is in the university he’ll have to deal with professors with personal language axes to grind. One of my professors was bonkers over Haskell. Its a fine language, but only in academic contexts. No businessman would use it. Its too limited, too obtuse, and too bloated and slow. It is a design failure in implementing one of its basic concepts.

Java has its advantages. If its what your professor wants, go with it.

Well, thank you! :slight_smile:

My major beef with C++ is that it doesn’t have a proper modularizing/packaging method. Include files are clunky at best and the namespaces are barely helping.

The syntax for Abstract methods is big hack too.

Also, I find that by sticking close to C, C++ often encourages people to stray from OOP and use legacy C hacks which makes the control flow much harder to understand.

Asside from that, I’d say it’s a much stronger language than Java will ever be even if Sun keeps pilling hacks on top to try to make us forget how the core is rotten.

Ah yes, and the fact that not everything is an object (after having used Python for a long time) is really silly (applies to C++ and Java equally).

The whole anonymous class hack in Java (often seen in UI code for event handlers) is the best exemple of that (well, disregarding the fact that you always have to convert primitive types into wrapper types to add them to collections)

Uhm, that ended up a longer rant that I thought I’d be.

Martin

Yer welcome, theeth.

My major beef with C++ is that it doesn’t have a proper modularizing/packaging method.

This is, in part, one of the reasons I like Pascal so much. It’s not just the built-in modularity, but the idea that it does a whole host of things for you that C/C++ requires you to meticulously spell out.

/end commercial/

Also, I find that by sticking close to C, C++ often encourages people to stray from OOP and use legacy C hacks which makes the control flow much harder to understand.

I think this is the single most valid criticism against C++.

Osxrules’s reference to Stroustrup’s famous quote about blowing one’s leg off comes from this very problem --that is, assuming that C and C++ are not separate branches of the same tree. Any serious C++ programmer should have a link to David Tribble’s site and the C++ FAQ-Lite.

JAVA and C#. A language that is worthless (from what I heard), and a language that has a whole bunch of stuff taken out so you can’t make programs, unless you pay $250,000 (probibly).[/quote]
you’re saying c# is worthless?

it’s what I use at work, it is definitely not worthless. Very much like java features wise, but [this makes me sound like a fanboy I know] condering visual studio makes development so easy… C# with .NET is awesome if you want to get things done. lots of memory is wasted in running programs, and it’s not as fast as c++ [or java people say], but being able to develop as quickly as we do those other things don’t really hurt too much.

that said, for my personal projects I’m not likely to use c#, I’m more likely to use c++ [for performance, like interactive stuff] or python [for quick things]

I think he was calling Java worthless and C# wallet-grubbing.

C# was designed by the designer of Delphi, whom Microsoft hired at rather astonishing expense…

As computer programming languages go, C++ is quite versatile even though its “designed by committee” roots show through (tho’ not as bad as Ada, which was designed by government… :slight_smile: ).

However, if we look back at your workmate’s original requirement, we see that he was looking for an application for “his database thing.” This implies a fairly high-level application … no particular performance requirements … frequent changes are likely … very similar to everything that anyone else doing the same sort of thing has ever done … no new and amazing uncharted territory to be covered here…

And hence, probably massive-underkill for something like C++.

If he did the application in something else, whether it be a language like Python or Ruby, or even a higher-level “application framework” tool, your workmate could probably get the job done more quickly and would be able to focus his attention on the particulars of “the application itself.” And there’s a lot to be said for that.

The quintessential example of a tool for this purpose is PowerBuilder or Microsoft Access … where almost anything you could want is provided for you, including the outer shell of the application, and essentially what you do when you “build” an application is to customize what the framework normally does, using artfully-placed bits of interpretive code.

My $0.02: avoid MS Access. I’ve never used anything more frustrating, internally and externally inconsistent, GUI feature lacking, and security disabled.

All database queries operate through a specific portal, such as an ADO or a DAO object. You’ll use SQL (or whatever) to perform your queries and record updates.

Using C++/Access/Java/whatever is for the front-end, or GUI interface, offered to the end-user, who doesn’t care one iota how the database is interfaced.

I presume your workmate wishes to use C++ because he is familiar with it?

Yes, that’s it. It’s from Microsoft, so it’s almost inherinatly cut-down on features.