Page 1 of 1 [ 8 posts ] 

NeantHumain
Veteran
Veteran

User avatar

Joined: 24 Jun 2004
Age: 46
Gender: Male
Posts: 4,837
Location: St. Louis, Missouri

25 Apr 2008, 10:54 pm

C++ is sometimes described as an object-oriented programming language, but the majority of valid C programs are also valid C++ programs, and C is certainly not object oriented. C started out as the language of UNIX and so was ideal as a sort of portable assembly language for writing the kernel, device drivers, system utilities, and even userland applications. C still contends and holds its ground at this level of abstraction. Throughout much of the 1990s, though, C++ dominated; it made features of more academic languages like Smalltalk and Simula available to the masses of C-educated programmers. It sort of worked. C programs could be retrofitted with a faddish quasi-object-oriented design. Frameworks like MFC and VCL could hide the horror of the operating system's underlying API. But then in the 2000s, new more assertively object-oriented languages took root: Java and C#. We now have programmers who learned OOP early on and no attempt at backwards compatibility with C. The C preprocessor is gone (why were we ever including textual source code files in an ostensibly modern object-oriented language like C++ anyway?).

Straight C still has its niches. Java and C# have intruded upon much of C++'s former in-house IT dominion. So does C++ still play a role, or was it a halfbreed made obsolete once the the virtual-machined object-oriented languages made their debut?



Pobodys_Nerfect
Veteran
Veteran

User avatar

Joined: 10 Mar 2008
Age: 47
Gender: Male
Posts: 600
Location: New Zealand

26 Apr 2008, 2:24 am

Maybe. I use C and Java, no C++



wolphin
Velociraptor
Velociraptor

User avatar

Joined: 15 Aug 2007
Age: 39
Gender: Male
Posts: 465

26 Apr 2008, 2:55 am

Quote:
(why were we ever including textual source code files in an ostensibly modern object-oriented language like C++ anyway?).


for the same reason that you claimed at the start, so that C programs would usually be valid C++ as well.

C++ served it's purpose in the evolution of programming languages, but it's certainly not ideal. It's far too complicated and yet inflexible in relation to more modern languages.

Java and C# have their place but also have their own problems. Java forces you do things in the "java style" and hasn't found very much influence in the non-web application space. C# is de facto a MS/windows thing and doesn't yet have the cross-platform availability (sorry, but mono is playing a catch-up game).

I like python, but (at this point, at least) it would be ridiculous to suggest that most things should be written in it.



neurodeviant
Veteran
Veteran

User avatar

Joined: 14 Oct 2006
Age: 42
Gender: Male
Posts: 1,182
Location: Britland

26 Apr 2008, 7:41 pm

Java/C# are pretty cool, but I think there should be a new, modern language like Java or C# that compiles to native machine code, as opposed to using a VM or interpreter, without all the preprocessor/makefile etc. crap. Maybe we should call it 'C=' (as a nod to Commodore)


_________________
Aspies: Because great minds think alone.


ToadOfSteel
Veteran
Veteran

User avatar

Joined: 23 Sep 2007
Age: 38
Gender: Male
Posts: 6,157
Location: New Jersey

27 Apr 2008, 10:11 pm

C++ is, in fact, a hybridized language... in other words, it's a language with an identity crisis...

However, it's still what's primarily used, so meh...



NeantHumain
Veteran
Veteran

User avatar

Joined: 24 Jun 2004
Age: 46
Gender: Male
Posts: 4,837
Location: St. Louis, Missouri

29 Apr 2008, 7:14 pm

ToadOfSteel wrote:
C++ is, in fact, a hybridized language... in other words, it's a language with an identity crisis...

However, it's still what's primarily used, so meh...

Primarily used where? I use Java at work, and in college, I had a course in C and C++, but most of them involved other programming languages.



Zwerfbeertje
Deinonychus
Deinonychus

User avatar

Joined: 6 Sep 2007
Age: 125
Gender: Male
Posts: 362

30 Apr 2008, 2:12 am

But you aren't the world, nor is your college. C++ is widely used and will probably remain one of the 'primarily' used programming languages for most applications.

During the time of writing Sourceforge totaled 175968 projects, 21647 projects are written in C, 25660 in C++, 31199 in Java. These three make up 45% of the projects.

NeantHumain wrote:
C++ is sometimes described as an object-oriented programming language, but the majority of valid C programs are also valid C++ programs, and C is certainly not object oriented.


What is your point? That C++ isn't an Object Oriented Programming language? The ability to use pre-existing C code in C++ programs does not eradicate it's OOP features. At least, I've never noticed anything in the standard that would indicate such behaviour was expected of valid implementations.

Object Oriented Programming is a programming paradigma, a way of thinking about and designing programs. Object Oriented Programming is not a language.

It's perfectly possible to design and write programs in Java that aren't 'Object Oriented' at all and it's equally possible to write programs in C that are 'Object Oriented'. The different OO languages only provide features that makes it easier to design and write in an OO way.


Quote:
We now have programmers who learned OOP early on and no attempt at backwards compatibility with C.


You don't have to learn C before you learn C++.

Quote:
Straight C still has its niches. Java and C# have intruded upon much of C++'s former in-house IT dominion. So does C++ still play a role, or was it a halfbreed made obsolete once the the virtual-machined object-oriented languages made their debut?


It's never been a halfbreed, C++ is a practical, efficient implementation of the idea's and concepts that we call Object Oriented Programming and it achieved more for the paradigm then any other implementation did. Without C++ to introduce OOP into mainstream application design, Java could not have existed.



Kalister1
Veteran
Veteran

User avatar

Joined: 8 Sep 2007
Age: 39
Gender: Male
Posts: 2,443

07 May 2008, 12:58 am

*C++ rules you*