OO or what?

  • Thread starter Abhishek Srivastava
  • Start date
A

Abhishek Srivastava

What is the opposite of Object Oriented?
C# is an object oriented language but C is a _______ language.

C is a procedural language.

There is no opposite of OO. You can choose to use other methodology if it suits the task at hand. Ex. If you are working on SQL Server 2000 and want to implement a piece of logic as a stored procedure you have to use relational/procedural means to write the SP in TSQL.

regards,
Abhishek.
 
P

Peter Morris

What is the oposite of Object Oriented?

C# is an object oriented language but C is a _______ language.


--
_______________________
/_____________________(_)
| _____________________ email to
| | |__________________(_) Peter_Morris_1 at
| |/____________________ btinternet dot com
|_____________________(_)
 
T

Thomas Tomiczek [MVP]

Peter Morris said:
What is the oposite of Object Oriented?

hat is the opposite of a car?

Programming methodologies develop - there is no opposite.
C# is an object oriented language but C is a _______ language.

Procedural.

Thomas Tomiczek
THONA Software & Consulting Ltd.
(Microsoft MVP C#/.NET)
 
J

Jay B. Harlow [MVP - Outlook]

Peter,
C is a procedural language.

However remember you can still apply object oriented methodology to the C
language itself.

Just as you can do procedural programming in C#.

Its just that C# & .NET lends itself to OO much better then C does ;-)

Just a thought
Jay
 
A

Alvin Bruney

However remember you can still apply object oriented methodology to the C
language itself.

how?
i guess you can get a car to roll on ball bearings for rims but what would
be the point of it? it wasn't designed for that. see what i'm saying?
 
J

Jay B. Harlow [MVP - Outlook]

Alvin,
I view C, C++, C#, VB.NET, RPG, Smalltalk, Fortran as an implementation
detail. That the analysis & design can and should still be done in a Object
Orient manner (OOA & OOD).

Remember I said Object Oriented Methodology, not specifically Object
Oriented Programming.

The best definition I have heard recently for an Object/Class was a Unit of
Responsibility.

In the simplest case: Within your C program you can define "units of
responsibility" that could center around a struct for example. You can
define all the behavior for a "unit of responsibility" that accept this
struct as a parameter (the 'this' pointer). All the attributes would be
members of this struct. Granted is not as elegant as C# or VB.NET, in many
ways it lacks polymorphism & inheritance. However IMHO its still oriented
toward objects...

In the extreme case: Have you ever looked at how COM is implemented for C?
Granted some OOP "purists" will deny that COM is OOP, however IMHO it is
definitely a subset of OO. Using manually created vtables (with some bizarre
macros, you can have polymorphism in C. (not sure if I would go to that
extreme). Remember that the early C++ compilers were actually translators
that converted the C++ code into C code, that the C compiler would then
compile... I'm sure one could define macros to "come close"...
i guess you can get a car to roll on ball bearings for rims but what would
be the point of it? it wasn't designed for that. see what i'm saying?
Which is my point! you can do OOA & OOD then implement it in C, if you
happen to be constrained to C!

Hope this helps
Jay
 
A

Alvin Bruney

Yes. you've convinced me to open up my mind a little more. I've never seen
it that way - i've never been able to think of C in an OO light. But what
you say, though radically different, is very sound technically. I like it.

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/2bz4t
Jay B. Harlow said:
Alvin,
I view C, C++, C#, VB.NET, RPG, Smalltalk, Fortran as an implementation
detail. That the analysis & design can and should still be done in a Object
Orient manner (OOA & OOD).

Remember I said Object Oriented Methodology, not specifically Object
Oriented Programming.

The best definition I have heard recently for an Object/Class was a Unit of
Responsibility.

In the simplest case: Within your C program you can define "units of
responsibility" that could center around a struct for example. You can
define all the behavior for a "unit of responsibility" that accept this
struct as a parameter (the 'this' pointer). All the attributes would be
members of this struct. Granted is not as elegant as C# or VB.NET, in many
ways it lacks polymorphism & inheritance. However IMHO its still oriented
toward objects...

In the extreme case: Have you ever looked at how COM is implemented for C?
Granted some OOP "purists" will deny that COM is OOP, however IMHO it is
definitely a subset of OO. Using manually created vtables (with some bizarre
macros, you can have polymorphism in C. (not sure if I would go to that
extreme). Remember that the early C++ compilers were actually translators
that converted the C++ code into C code, that the C compiler would then
compile... I'm sure one could define macros to "come close"...
i guess you can get a car to roll on ball bearings for rims but what would
be the point of it? it wasn't designed for that. see what i'm saying?
Which is my point! you can do OOA & OOD then implement it in C, if you
happen to be constrained to C!

Hope this helps
Jay

the
C

how?
i guess you can get a car to roll on ball bearings for rims but what would
be the point of it? it wasn't designed for that. see what i'm saying?

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/2bz4t
the
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top