Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Re: Re: The world is not object oriented

by tilly (Archbishop)
on Jan 04, 2004 at 00:13 UTC ( #318563=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: The world is not object oriented
in thread The world is not object oriented

I don't think that we are going to come to agreement on whether closures are objects. Of course you can shoehorn your understanding of closures into an OO framework. But that isn't a useful view because it seriously misleads you about how to actually make effective use of them.

If I was going to put this as a linguistic metaphor, I'd say that objects make good nouns and closures make good verbs. You think about them completely differently, and you evolve designs with them differently as well. With objects you think about pieces that need to communicate with each other. With closures you evolve behaviours.

But that is rather vague. Read Why I like functional programming, Re (tilly) 1 (perl): What Happened...(perils of porting from c) and Re (tilly) 1: 5x5 Puzzle to get an idea of how I use closures in practice. If you don't get a sense from that code that manipulating closures "feels different" than OO design, then I really don't have any idea how to communicate the mindset shift involved.


Comment on Re: Re: Re: Re: The world is not object oriented
Re^5: The world is not object oriented
by hardburn (Abbot) on Jan 05, 2004 at 01:08 UTC

    I don't think that we are going to come to agreement on whether closures are objects.

    No, probably not.

    I don't think I really made this point very well above (which is my fault), but it's not that I put an absolute stamp on closures as objects. Rather, I think they can be used as a limited form of object, but they're not limited to OO, either.

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    : () { :|:& };:

    Note: All code is untested, unless otherwise stated

      ...it's not that I put an absolute stamp on closures as objects. Rather, I think they can be used as a limited form of object, but they're not limited to OO, either.

      Imagining this as a Venn diagram, what then, I wonder, would be an appropriate name for the field of endeavor and design that exists in the intersection?

      (I need to know so I can complete my OO model of OO-ish concepts...;)

      Matt

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://318563]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2014-08-30 21:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls