Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
The stupid question is the question not asked
 
PerlMonks  

Re: The world is not object oriented

by Corion (Pope)
on Jan 02, 2004 at 09:48 UTC ( #318271=note: print w/ replies, xml ) Need Help??


in reply to The world is not object oriented

As I am on the other side of the divide of mathematicians, I should feel more comfortable with objects, and to some degree, this seems true, as my first "real" language was Turbo Pascal 4, and I implemented my own object oriented windowing system on top of it (or rather, I learned, that it is bad to have parameter lists of 30ish mandatory parameters, and passed records around). I'm not sure though, whether this was because object orientation was the destined path or whether object orientation has been the most successful tool for windowing systems.

On the other hand, I have been passing around functions as parameters since TP4 as well, but Perl was my first language where I could pass around real closures - TP suffered from being tied to the processor stack, like C.

On the third hand, "Object Orientation" means (to the functional programmers) only that you have a lot of functions that take a common first parameter or that have a curried first parameter, so all hardcore Lisp programmers will consider Object Orientation just syntactic candy, but I, as a Perl programmer, like syntactic candy.

perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web


Comment on Re: The world is not object oriented
Download Code
Re: Re: The world is not object oriented
by tilly (Archbishop) on Jan 03, 2004 at 02:22 UTC
    OO should mean a lot more than that to a functional programmer.

    OO gives you a fairly flexible prebuilt data-driven function dispatch mechanism. This is better than a closure with a curried first parameter because you have multiple related functions associated with the data. Furthermore you have mechanism to associate functions with data which allows you limited ability to abstract relations between things.

    Plenty of Lisp programmers find this useful, which is why many Lisp systems have built-in object oriented systems. Sure, Lisp can't associate any syntactic sugar with it. But the idea of layering abstractions on top of each other so that in the end you can find a natural implementation is very well appreciated in the Lisp world, and plenty of Lisp programmers use OO.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2014-04-19 08:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (478 votes), past polls