Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Re: Object Orientation is:

by agentv (Friar)
on Sep 05, 2002 at 06:18 UTC ( #195297=note: print w/ replies, xml ) Need Help??

in reply to Re: Object Orientation is:
in thread Object Orientation is:

...this is very funny, but the analogy breaks down immediately when we realize that the heart is a component of a system that is not subject to extension, redesign, or feature creep. (So far at least, who knows what will happen in the age of nanotechnology?)

It's easy to laugh at the idea that encapsulation leads to the possibility that we could replace the heart with a vacuum cleaner or a rooster. But imagine a real-world situation that concerns something almost as dear to many of us, the filesystem.

Most Unix filesystem afficionados are aware that files are based upon a construct known as the inode. (An inode contains all of the relevant information that defines a file with the exception of the file's name.) In order to support the notion of remotely available files through the NFS filesystem, designers had to choose between either modifying the core code in the kernel to make special exceptions for files that are seen in a mounted NFS filesystem, or finding an abstract layer that encompassed all of the things that are common to both types of files.

It would not have been difficult to account for both types of files in the kernel, but then there was this other form of networking that was common in the early days of NFS. A lot of people called this the "sneaker net." People wanted to put floppy disks with PC filesystems into their systems and be able to read them.

So without an abstract representation of the inode concept, there would have had to be changes in the kernel to account for every new filesystem that came along. (So the S5 filesystem, the UFS filesystem, the PCFS filesystem and NFS filesystems were just the beginning of the problem.)

By throwing some plaster around the problem (not a meter thick perhaps, but maybe only a few centimeters), it became possible to support a virtually unlimited number of new filesystem types without much change to the kernel core.

In the end, OO programming is over-hyped, but then so are Tiger Woods, Michael Jordan, and Barry Bonds. This does not detract from their greatness. On the other hand, you probably wouldn't hire Tiger Woods to clean your carpets. A simple Perl one-liner would be a better choice.

...All the world looks like -well- all the world, when your hammer is Perl.

Comment on Re: Re: Object Orientation is:
Re: Re: Re: Object Orientation is:
by agentv (Friar) on Sep 06, 2002 at 16:16 UTC
    ...I fully expected someone to challenge me to demonstrate the Perl one-liner that will clean your carpets.

    ...All the world looks like -well- all the world, when your hammer is Perl.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2014-10-25 15:02 GMT
Find Nodes?
    Voting Booth?

    For retirement, I am banking on:

    Results (145 votes), past polls