The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

why don't we see OOP vs functional language wars?

Both camps have a lot of zeal for the One True Way.  The two paradigms are somewhat opposed.  Why do they always pick on the guy using gotos instead of turning on each other?

Not trying to start a fight but I am really curious why I have never seen them argue.  Is there a secret truce to ignore each other?  Or maybe I am missing something.

Me, I find joy in all programming paradigms, it is a craft not a religion.
Tom
Friday, July 14, 2006
 
 
Because you can get a lot more done faster with OO than functional?
Dino Send private email
Friday, July 14, 2006
 
 
OOD is the One True Way, but given a choice between a "OO pretending" in a crap language like C++, Java or C# and functional programming in Cobol, I'll take the Cobol.
Art Wilkins
Friday, July 14, 2006
 
 
Art -

COBOL is not a functional language.

As for the original question-

I think it has to do with scope.  Language wars are like racism.  Most of the arguments are based in someone's limited world view and are not objective.  Even if one truly is superior, at least the argument is Granny Smith vs Fuji.

Programming paradigms, on the other had, are too different to be compared in the same way.  You can't argue that a bycicle is better suited to haul a 50' trailer full of refrigerators than a semi.  They're both transportation, but they're so disimilar that there is no competition between the two.  They're both fruit, but Fuji vs Navel just doesn't make sense.
Posted by me
Friday, July 14, 2006
 
 
Two reasons:

1. The flames exist, you're just not looking in the right place. Try Usenet.

2. OO and functional programming don't actually conflict. Objects are a way of organizing the relationships between pieces of your program, and functional programming is a style that tends to reduce errors inside those pieces.


There are a number of languages with features specially designed to support the style in #2 (OCaml, et al.), but they're not strictly necessary; I'm a big fan of using immutable value objects in languages like Java, so you can receive at least a few of the benefits of the functional approach.
Mark Jeffcoat Send private email
Friday, July 14, 2006
 
 
My guess is that there simply aren't enough programmers who are sufficiently familiar with functional languages for the critical mass necessary to generate a noticeable level of flame wars.  A typical programmer probably thinks you're talking about C or COBOL when you say "functional language".
SomeBody Send private email
Friday, July 14, 2006
 
 
In my experience a combination of both is the best approach to programming that I have seeing so far. But closures are fundamental for functional programming to stay free of procedural structure/OO.

I just don't think pure functional programming or pure object orientation as interesting, sorry. Ruby allows both to coexist.
Lostacular
Friday, July 14, 2006
 
 
Oh, ok, you guys are talking about lisp.

I assumed we're really talking about object oriented design vs structured design, and I think some others did too.

Right, lisp vs C++. Yeah, I've seen that flamewar.
Art Wilkins
Friday, July 14, 2006
 
 
BTW, C# has been joining the OO and FP features in the same language. C# 3.0 should be better in that sense.
Lostacular
Friday, July 14, 2006
 
 
They have wars all the time. But when both sides are toothless nobody really get hurt.
son of parnas
Friday, July 14, 2006
 
 
isn't it depend on what type of software/tool that you try to create. the windows app that i'm working on right now just call the sub (i use VB.net w/VS studio 2005) i don't see how OOP going to help with such small app that i'm developing for in house use.
DotNetNoob
Friday, July 14, 2006
 
 
uh, the OP must have never visted comp.lang.lisp...

Friday, July 14, 2006
 
 
I would say most of the reason is that very few people who are involved in writing code know much of anything about the various programming paradigms that have been invented over the years. Some of the messages above serve as a good illustration of this. Everyone one go read the following article and come back:

  http://en.wikipedia.org/wiki/Programming_paradigm

The second reason is that virtually everyone who writes code does so in imperative languages (or in an imperative style). Everything else is in the noise. I would guess that most people don't even *know* there are languages that don't work like C or BASIC.

Hence, little conflict.
Robby Slaughter Send private email
Friday, July 14, 2006
 
 
I am not sure if I they are wars, but I have been reading a lot of articles extolling the virtues of functional programming (specifically with Lisp, Erlang, Haskell), particularly with respect to multithreaded programming.  Apparently, due to their mathematical nature, it is easy to reason about functional languages (and paradigms) which makes it easy to parallelize their activities.  Don't get me wrong, I have no personal experience to back that up, but from what I have read it seems like something we (as computer science people) should be looking at.
Joshua Volz Send private email
Friday, July 14, 2006
 
 
Hmm so it is ignorance of functional languages that keep the war from starting?  I guess that makes sense, though I thought that everyone knew about functional languages.  I haven't ever worked as a programmer so I only know one programmer (my brother) and he mostly codes in assembly and C (linux guy, writes low-level stuff).  I'm still kind of surprised.  Everyone at my college takes a course on Lisp taught by an ancient man who actually believed that we use FORTRAN in our other courses.
Tom
Saturday, July 15, 2006
 
 
I think you hipsters mean "procedural programming" and not "functional programming".

 http://en.wikipedia.org/wiki/Functional_programming
Bob
Saturday, July 15, 2006
 
 
The "Earth Shoes" of programming languages.
A. Hipster
Saturday, July 15, 2006
 
 
"In my experience a combination of both is the best approach to programming that I have seeing so far. But closures are fundamental for functional programming to stay free of procedural structure/OO."

I'll say just one word: Javascript.
Berislav Lopac Send private email
Sunday, July 16, 2006
 
 
Javascript has closures a la Ruby?

Also, I have never programmed in an OO way in JS, but I remember seeing a clumsy "prototype" (or something) keyword.

JS with some tweaks could be better.
Lostacular
Sunday, July 16, 2006
 
 
Slightly off-topic, but I suspect that there are some aspects of human nature that come into play. For example, in every spoken language that I know of, nouns outnumber verbs by a big margin. So it seems natural that object-oriented programming has become so popular. We typically use nouns to name classes, and verbs to name methods. If we did it the other way 'round, making the verb primary and the noun secondary, it would feel like entering a DOS command line. Dividing up the problem space into verb categories instead of noun categories just wouldn't be very effective. I guess what I'm trying to say is that OOP just isn't very controversial. I've been programming since 1979, and I haven't seen anything that seems as natural as OOP. I studied Lisp in college. Never found a practical use for it.
Smoothie
Sunday, July 16, 2006
 
 
"OO and functional programming don't actually conflict. Objects are a way of organizing the relationships between pieces of your program, and functional programming is a style that tends to reduce errors inside those pieces."

Not true. Normally, "functional programming" implies a style of programming in which values are constructed once and then never changed, whereas OO programs are all about manipulating state.
bashful
Sunday, July 16, 2006
 
 
FYI Lisp is not a functional programnming language!
Arethuza Send private email
Monday, July 17, 2006
 
 
The comparison between OOP and FP is wrong. It compares two different things; it is like comparing apples to oranges. What should be compared to FP is imperative programming, of which OOP is a subset.

There are lots of flamewars around (check out LtU for example) but the reason that these flamewars are not "mainstream" is because functional programming languages are not widely adopted yet.

In my opinion a functional programming language like Haskell will never be widely adopted because it is weird and reflects the weirdness of the bearded academics that created it. Although there are some good concepts underlying Haskell, the stuff is too much out of this world and will never catch on.
Achilleas Margaritis Send private email
Monday, July 17, 2006
 
 
Possibly the most widely adopted functional language is XSLT.
Berislav Lopac Send private email
Monday, July 17, 2006
 
 
Achilleas: people said the same thing about Simula and Smalltalk, and lo and behold neither ever caught on.

But OOP seems to be quite popular...
Iago
Monday, July 17, 2006
 
 
I had to read the Wikipedia article to find out what a functional language was.  After reading that, I suspect that there are few flame wars because there isn't much bloody need.  Everything for functional programming looked highly specialized.  So it would be about like fighting over whether a Honda or a cement truck is a better vehicle for the morning commute.
Clay Dowling Send private email
Tuesday, July 18, 2006
 
 
Arethuza says:
"FYI Lisp is not a functional programnming language!"

Arethuza, FYI, your being a little bit too freaakin' nitpicky.  Lisp is close enough, dude.
Bob
Tuesday, July 18, 2006
 
 
Check out a language called Scala.

It's both a functional language AND and OO language, and manages to integrate the two ideas very well (no they aren't completely opposed to one another).

It's also statically typed and has a pretty powerful type system with type inference, and a compiler targetting the JVM. It can access existing Java classes with ease.
Matt Send private email
Wednesday, July 19, 2006
 
 
Iago:

So basically we agree(?). I said Haskell will never catch on.
Achilleas Margaritis Send private email
Wednesday, July 19, 2006
 
 
> would be about like fighting over whether a Honda or a cement truck is a better vehicle for the morning commute

That would be a stupid argument, yes. The cement truck wins hands down because there would be no problems parking.

Friday, July 21, 2006
 
 
Haskell is fairly widely used among functional programming academics. If you are doing an kind of interesting PL work it's ML or Haskell.

It will never be one for the monkeys, but that wasn't it's design goal.

Sunday, July 23, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz