Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Is C good enough - or can the world survive w/o OOP

Reply
Thread Tools

Is C good enough - or can the world survive w/o OOP

 
 
dukeofperl@ml1.net
Guest
Posts: n/a
 
      12-28-2009
I'm learning C (after having taught myself Perl, Tcl, Bash etc). For me, OOP (i.e. C++, Objective-C, etc) is mind-bogling information overload. Seriously, does programming *need* to be as convoluted as OOP appears to me? Cannot C - all by its lonesome - do as good of a job as an OOP appraoch?

I'm just trying to set a course for myself. I realize that "languages" are simply tools in my toolset. However, some toos are simply way over the top, IMHO, for most jobs. Is that not so? TIA...
--
duke
 
Reply With Quote
 
 
 
 
Tom St Denis
Guest
Posts: n/a
 
      12-28-2009
On Dec 28, 10:27*am, (E-Mail Removed) wrote:
> I'm learning C (after having taught myself Perl, Tcl, Bash etc). For me, OOP (i.e. C++, Objective-C, etc) is mind-bogling information overload. Seriously, does programming *need* to be as convoluted as OOP appears to me? Cannot C - all by its lonesome - do as good of a job as an OOP appraoch?
>
> I'm just trying to set a course for myself. I realize that "languages" are simply tools in my toolset. However, some toos are simply way over the top, IMHO, for most jobs. Is that not so? TIA...
> --
> duke


Think of languages as tools not quests. Learn C if it offers you what
you need to solve your problems, not because it sounds catchy and good
on a C.V.

And for the record, you can do a lot of OOP like things (like
anonymous interfaces) through pointers to functions and structures. A
lot of the higher level ideas like inheritance, friends, derived
objects are less straightforward but honestly, I have yet to see a
case where they actually are "required" to proficiently solve a
problem.

I think the problem is people look at things from the finished product
side and say "if I had to port this to C [or vice versa] it'd be a
mess," and then use that as a reason to prefer their language of
choice, when in reality if you started from scratch in the other
language your solution would take a vastly different course.

Tom
 
Reply With Quote
 
 
 
 
Donkey Hottie
Guest
Posts: n/a
 
      12-28-2009
On 28.12.2009 17:27, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> I'm learning C (after having taught myself Perl, Tcl, Bash etc). For me, OOP (i.e. C++, Objective-C, etc) is mind-bogling information overload. Seriously, does programming *need* to be as convoluted as OOP appears to me? Cannot C - all by its lonesome - do as good of a job as an OOP appraoch?
>
> I'm just trying to set a course for myself. I realize that "languages" are simply tools in my toolset. However, some toos are simply way over the top, IMHO, for most jobs. Is that not so? TIA...
> --
> duke


You can do anything with C (as well as in asm), but that is not
practical nowadays unless the problem is somewhat trivial. OOP brings
maintainability, readability and also productivity.

To me, most OO languages are more understandable than C or PHP. I just
can't understand most/those script languages. I prefer strong typing and
a compiler warning about errors before they happen.

OO languages bind together 'things' (objects) and possible actions upon
them. The connection is easily understood by reading the code.

When you see a 'struct' in C language, you see the 'thing', but you have
no idea what can be done with it.


--
http://www.iki.fi/jarif/

Q: What's the difference between a Mac and an Etch-a-Sketch?
A: You don't have to shake the Mac to clear the screen.
 
Reply With Quote
 
Julienne Walker
Guest
Posts: n/a
 
      12-28-2009
On Dec 28, 10:27*am, (E-Mail Removed) wrote:
> Seriously, does programming *need* to be as convoluted as OOP appears to me?


More or less. Keep in mind that writing quality software is hard, and
keeps getting harder as software becomes more complex. Methodologies
like OOP were invented to help maintain quality as complexity grows.

I suspect your opinion is biased because you haven't seen OOP used
properly, or you don't have enough experience to see the benefits.
Despite what the books say, I think that OOP is not very intuitive,
and a *lot* of people abuse it unintentionally. In theory OOP is a
grand idea, but in practice I haven't seen many elegant uses of it at
all.

> Cannot C - all by its lonesome - do as good of a job as an OOP appraoch?


Ignoring that many of the best practices for structured programming
run parallel to those of OOP, a well written C program is just as good
as a well written program in your OO language of choice. It's not so
much the tool that determines quality as it is the craftsman. There's
nothing inherent in C that makes it impossible to avoid losing quality
as the complexity grows, you just have to know what you're doing.
 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      12-28-2009
Donkey Hottie a écrit :
>
> You can do anything with C (as well as in asm), but that is not
> practical nowadays unless the problem is somewhat trivial. OOP brings
> maintainability, readability and also productivity.
>


Sure sure...
And it brings also a lot of unneeded baggage

The problem is that OO is OK when you have a problem that fits nicely within
the OO paradigm. When your problem does NOT fit within that, OO is an
obstacle.

> To me, most OO languages are more understandable than C or PHP.


To you. You got used to OO. ANd I got used to the vi editor. And I
think it is more easy to use than emacs or others because...
well, because I am used to it.


> I just
> can't understand most/those script languages. I prefer strong typing and
> a compiler warning about errors before they happen.
>
> OO languages bind together 'things' (objects) and possible actions upon
> them. The connection is easily understood by reading the code.
>


ALL the code. You have to know all the hierarchy and how this method fits
in that hierarchy, if its overloaded or not, etc. At the end you do not know
what are you calling unless you fire up the debugger.

> When you see a 'struct' in C language, you see the 'thing', but you have
> no idea what can be done with it.


When you see "foo" in OO:

o is this the base class "foo"?
o is it instance->foo()?
o is it a freidn's class foo()?

Then you discover that you have no idea which foo is being
called. See above.

Good luck

 
Reply With Quote
 
Duke Normandin
Guest
Posts: n/a
 
      12-28-2009
On 2009-12-28, Tom St Denis <(E-Mail Removed)> wrote:
> On Dec 28, 10:27*am, (E-Mail Removed) wrote:


>> I'm learning C (after having taught myself Perl, Tcl, Bash etc). For me,
>> OOP (i.e. C++, Objective-C, etc) is mind-bogling information overload.
>> Seriously, does programming *need* to be as convoluted as OOP appears to
>> me? Cannot C - all by its lonesome - do as good of a job as an OOP
>> appraoch?
>>
>> I'm just trying to set a course for myself. I realize that "languages"
>> are simply tools in my toolset. However, some toos are simply way over
>> the top, IMHO, for most jobs. Is that not so? TIA... -- duke

>
> Think of languages as tools not quests. Learn C if it offers you what
> you need to solve your problems, not because it sounds catchy and good
> on a C.V.


You bet! I said as much in my 2nd paragraph above

> And for the record, you can do a lot of OOP like things (like
> anonymous interfaces) through pointers to functions and structures. A
> lot of the higher level ideas like inheritance, friends, derived
> objects are less straightforward but honestly, I have yet to see a
> case where they actually are "required" to proficiently solve a
> problem.


I don't know for sure (because I don't know OOP), but I sense that you're
correct in what you say. OOP is perhaps just another way of expressing a
solution to a problem - a way that makes sense to a subset of folks. Kinda
like using RPN calculators - makes damn good sense to a large subset, but is
a PITA to another subset.
--
Duke Normandin
*** Tolerance becomes a crime, when applied to evil [Thomas Mann] ***
 
Reply With Quote
 
Duke Normandin
Guest
Posts: n/a
 
      12-28-2009
On 2009-12-28, jacob navia <(E-Mail Removed)> wrote:
> Donkey Hottie a écrit :
>>
>> You can do anything with C (as well as in asm), but that is not
>> practical nowadays unless the problem is somewhat trivial. OOP brings
>> maintainability, readability and also productivity.
>>

>
> Sure sure...
> And it brings also a lot of unneeded baggage
>
> The problem is that OO is OK when you have a problem that fits nicely within
> the OO paradigm. When your problem does NOT fit within that, OO is an
> obstacle.
>
>> To me, most OO languages are more understandable than C or PHP.

>
> To you. You got used to OO. ANd I got used to the vi editor. And I
> think it is more easy to use than emacs or others because...
> well, because I am used to it.
>
>
>> I just
>> can't understand most/those script languages. I prefer strong typing and
>> a compiler warning about errors before they happen.
>>
>> OO languages bind together 'things' (objects) and possible actions upon
>> them. The connection is easily understood by reading the code.
>>

>
> ALL the code. You have to know all the hierarchy and how this method fits
> in that hierarchy, if its overloaded or not, etc. At the end you do not know
> what are you calling unless you fire up the debugger.
>
>> When you see a 'struct' in C language, you see the 'thing', but you have
>> no idea what can be done with it.

>
> When you see "foo" in OO:
>
> o is this the base class "foo"?
> o is it instance->foo()?
> o is it a freidn's class foo()?
>
> Then you discover that you have no idea which foo is being
> called. See above.
>
> Good luck


I agree with everything you said, in the sense that my *gut feelings* tells
me it's so. OOP to means *looks* like a huge, convoluted, cluster-****; a
tangle of earthworms; a bloody mess. I don't grok it -- *but* I thought that
maybe I was giving up too quickly on perhaps a hell-of-a good tool. My guts
say "**** no!"; my head says "asks somebody who knows".

For the time being, I'll learn C; then I'll give LISP (via newLisp) another
shot.
--
Duke Normandin
*** Tolerance becomes a crime, when applied to evil [Thomas Mann] ***
 
Reply With Quote
 
Duke Normandin
Guest
Posts: n/a
 
      12-28-2009
On 2009-12-28, Julienne Walker <(E-Mail Removed)> wrote:
> On Dec 28, 10:27*am, (E-Mail Removed) wrote:
>> Seriously, does programming *need* to be as convoluted as OOP appears to me?

>
> More or less. Keep in mind that writing quality software is hard, and
> keeps getting harder as software becomes more complex. Methodologies
> like OOP were invented to help maintain quality as complexity grows.
>
> I suspect your opinion is biased because you haven't seen OOP used
> properly, or you don't have enough experience to see the benefits.
> Despite what the books say, I think that OOP is not very intuitive,
> and a *lot* of people abuse it unintentionally. In theory OOP is a
> grand idea, but in practice I haven't seen many elegant uses of it at
> all.


You're correct! I am biased because I've tried to learn OOP via Perl,
Javascript, and C++, and it always turns out to be a bunch of balck noise to
me - craptitude, really. *You* are correct in asserting that OOP is *not*
intuitive - as far as I'm concerned anyway. However, I thought that I would
ask in the event that my vision was blurred to a truely significant
programming gem.

>> Cannot C - all by its lonesome - do as good of a job as an OOP appraoch?

>
> Ignoring that many of the best practices for structured programming
> run parallel to those of OOP, a well written C program is just as good
> as a well written program in your OO language of choice. It's not so
> much the tool that determines quality as it is the craftsman. There's
> nothing inherent in C that makes it impossible to avoid losing quality
> as the complexity grows, you just have to know what you're doing.


Too cool! Exactly what I wanted to hear! Now I can proceed with C, and
*know* that "I can do anything!". Like Crash - or was it Eddie - (the
opossoms!!) in the movie "Ice Age - Meltdown", when he "came to" after his
crash landing
--
Duke Normandin
*** Tolerance becomes a crime, when applied to evil [Thomas Mann] ***
 
Reply With Quote
 
Seebs
Guest
Posts: n/a
 
      12-28-2009
On 2009-12-28, (E-Mail Removed) <(E-Mail Removed)> wrote:
> I'm learning C (after having taught myself Perl, Tcl, Bash etc).
> For me, OOP (i.e. C++, Objective-C, etc) is mind-bogling information
> overload. Seriously, does programming *need* to be as convoluted
> as OOP appears to me? Cannot C - all by its lonesome - do as good
> of a job as an OOP appraoch?


OOP is a very good model for some things, and a very poor model for
others.

> I'm just trying to set a course for myself. I realize that
> "languages" are simply tools in my toolset. However, some toos are
> simply way over the top, IMHO, for most jobs. Is that not so? TIA...


I've done a lot of work for which OO programming is extremely useful
and expressive, although I don't care for C++. Still, OO languages
(I'm fond of Ruby) really are excellent for some kinds of work.

For others, I like C.

-s
--
Copyright 2009, all wrongs reversed. Peter Seebach / (E-Mail Removed)
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      12-28-2009
Seebs <(E-Mail Removed)> writes:
> On 2009-12-28, (E-Mail Removed) <(E-Mail Removed)> wrote:
>> I'm learning C (after having taught myself Perl, Tcl, Bash etc).
>> For me, OOP (i.e. C++, Objective-C, etc) is mind-bogling information
>> overload. Seriously, does programming *need* to be as convoluted
>> as OOP appears to me? Cannot C - all by its lonesome - do as good
>> of a job as an OOP appraoch?

>
> OOP is a very good model for some things, and a very poor model for
> others.

[...]

Can you give an example of something for which OOP is a very poor
model?

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enough is enough... Imhotep Computer Security 16 09-28-2005 03:36 PM
Enough is enough.... ajacobs2 Digital Photography 33 10-05-2003 12:14 PM
Resolution - when is Enough ENOUGH? (a personal view) VT Digital Photography 43 09-12-2003 11:15 AM



Advertisments