I was being a bit tongue-in-cheek with my response.  It seems this discussion 
is 
heading in the following direction:

1. it is possible to express the world/program using a staunch OO view or an FP 
one
2. in most cases, both philosophies require some compromises
3. there are specific situations, where at least one philosophy works very well
4. there are situations, where one is clearly a better fit than the other
5. usually, at the end of it all, we're all talking about the best way to make 
specific hardware with known capabilities and limitations behave the way we 
want 
to

It seems, when we talk about hybrid solutions, it's not that the answer is to 
pile on as many approaches into one place as possible, but find a way to 
seamlessly integrate pieces that have differing inner workings that suit their 
given functions.  And sometimes, the same solution can be inspected from both 
OO 
and FP point of view, because many languages, even if they are not expressly 
giving you the ability to mix paradigms, are still usable with different 
patterns that answer to these paradigms.  We all know full well that it's 
possible to write in FP style using existing Java constructs.

Among "real-world" analogies, my favorite is that of beaurocracy (think film 
Brazil).  An organization of large enough size is comprised of 2 kinds of 
things: workers and policies.  Both workers and policies are contextualized.  A 
worker may belong to one or more unit, be subject to policies.  A policy may be 
owned by a unit, or be applicable to a unit, or a worker, or other policies, 
etc.  What I find interesting about this is that there is no clearly superior 
way to organize this until there is a specific problem or a set of problems 
involved.  In other words, it makes no sense to talk about OO, FP, or even 
procedural programming relative superiority until we know what the hell we're 
trying to do with it.

 Alexey
2001 Honda CBR600F4i (CCS)
2002 Suzuki Bandit 1200S
1992 Kawasaki EX500
http://azinger.blogspot.com
http://bsheet.sourceforge.net
http://wcollage.sourceforge.net





________________________________
From: Kevin Wright <[email protected]>
To: [email protected]
Sent: Fri, July 16, 2010 11:47:12 AM
Subject: Re: [The Java Posse] Re: Is functional programming "abstract  
nonsense"?

2 + 3

Where's the essential complexity here?
Sure, the numbers are important, but do either of them "own" the plus?
If so, where does it belong, does 2 have the capability to have another number 
added to itself, or does 3 have the capability to be added to another number?

Or, is `+` a standalone verb in its own right? a concept related to numbers in 
general but not specifically tied to any one of them.

In pure OO theory, `+` must be defined as a member on the value 2, so we would 
send the message `+` to that integer with a parameter of `3`

Statics won't help you reason about this either, nor will primitives, as 
neither 
concept is acceptable in pure OO.



On 16 July 2010 16:36, Alexey Zinger <[email protected]> wrote:

Your example still brings you back to OO: you're thinking 
this.pushDown(car.gasPedal)
>
> Alexey
>2001 Honda CBR600F4i (CCS)
>2002 Suzuki Bandit 1200S
>1992 Kawasaki EX500
>http://azinger.blogspot.com
>http://bsheet.sourceforge.net
>http://wcollage.sourceforge.net
>
>
>
>
>
>
________________________________
From: Nick  <[email protected]>
>To: The Java Posse <[email protected]>
>Sent: Thu, July 15, 2010 10:09:48 AM
>Subject: [The Java Posse] Re: Is functional programming "abstract nonsense"?
>
>
>I was thinking about this on the drive to work a few months ago.  OO
>does mimic the way we view the world in its focus on objects or
>nouns.  Think about how you would describe a scene to someone, you
>would focus on the objects and then describe attributes or things they
>are doing.  "There is a road, its full of cars", "There is a
>pedestrian, he is walking on the sidewalk", "There is a car, it's
>honking at me because I almost hit it" (ok, maybe these thought
>experiments should be saved for when I'm not operating a motor
>vehicle).  And thus its very natural for us to fall into OO concepts
>when we are designing a system since that is effectively what we are
>doing, describing the system.
>
>But its really not a natural way for us to interact with the world
>(which is closer to what we are doing when we actually write
>software).  There our focus becomes on actions, on verbs.  To put it
>in  a programming form, I'm not thinking gasPedal.pushDown(), I'm
>thinking pushDown(gasPedal).  Now perhaps that particular example is
>more of a linguistic thing, but think about it next time you are
>interacting with something (as opposed to just describing it) in the
>real world.  Are you focused on the thing itself, or what you are
>doing to it?
>
>On Jul 15, 8:35 am, Carl Jokl <[email protected]> wrote:
>> I might argue that in the case of Object Oriented programming, a big
>> aspect of making it natural to learn is the way it mimics the real
>> world.
>> Objects can be created which mimic real world objects. The ability to
>> identify an object with objects in real life helps make the concepts
>> more
>> natural once you see how it works.
>>
>> In the case of functional programming, I am not  sure if there is a
>> real world analogy to draw upon. It is heavily inspired by mathematics
>> which isn't everybody's strongest suit. Granted
>> that plenty of maths exists in nature but still...
>>
>> I learned Haskell and Prolog in University and haven't used them
>> since.
>> I have long believed in trying to use the right tool for the job. I
>> think a hybrid is the best way forward.
>
>-- 
>You received this message because you are subscribed to the Google Groups "The 
>Java Posse" group.
>To post to this group, send email to [email protected].
>To unsubscribe from this group, send email to 
>[email protected].
>For more options, visit this group at 
>http://groups.google.com/group/javaposse?hl=en.
>
>
>
>
-- 
>You received this message because you are subscribed to the Google Groups "The 
>Java Posse" group.
>To post to this group, send email to [email protected].
>To unsubscribe from this group, send email to 
>[email protected].
>For more options, visit this group at 
>http://groups.google.com/group/javaposse?hl=en.
>


-- 
Kevin Wright

mail/google talk: [email protected]
wave: [email protected]
skype: kev.lee.wright
twitter: @thecoda


-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.



      

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to