Nick, are you sure you're not thinking

getFoot(RIGHT).pushDown(car.getGasPedal())

?

On Jul 15, 10:09 am, Nick <[email protected]> wrote:
> 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.

Reply via email to