Fog Creek Software
Discussion Board

Thingy Programming

>If I started talking in this forum about "thingy" >programming because "object oriented" was "too long
>to type and I don't feel like it", I doubt if I would be
>taken seriously.

Heh.  See Programming Perl by Larry Wall.  :-)

Seriously, in Perl, objects are called "Thingies."

I'm a VC programmer, but I'm a huge perl fan. 

I think that's funny.  Sorry.  The God and Computers discussiion was getting too long. :-)

Matt H.
Friday, January 3, 2003

It's not in the index of the 3rd edition and I don't see it scanning through the chapter on objects. Do you have an earlier edition? has it been deprecated?

I like the concept and  would like a solid reference before I start preaching the word about Thingies.

X. J. Scott
Friday, January 3, 2003

I've got the 2nd Edition -

Chapter 4: References and Nested Data Structures

"...The other kind of reference is the hard reference.  A hard reference refers not to the name of another variable (which is just a container of a value) but rather to an actual value, some internal glob of data, which we will call a "thingy", in honor of that thingy that hangs down in the back of your throat ... Suppose, for example, that you create a hard reference to the thingy contained in the variable @array ..."

Chapter 5 "Packages, Modules, and Object Classes"

"Perls Objects

Here are three simple definitions that you may find reassuring:

An object is simply a refrenced thingy that happens to know which class it belongs to ... (SNIP)

An object is simply a referenced thingy (BOLD, big type)

Perl doesn't provide any special syntax for constructors.  A constructor is merely a subroutine that returns a reference to a thingy that it has blessed into a class, generally the class in which the subroutine is defined.  The constructor does this using the built-in bless function, which marks a thingy as belonging to a particular class.  It takes either one or two arguments: the first argument is a regular hard reference to any kind of thingy, and the second argument (if present) is the package that will own the thingy.  If no second argument is supplied, the current package is assumed.  Here is a typical constructor:

package Critter;
sub new { return bless {}; }

The {} composes a reference to an empty anonymous hash.  The bless function ..."

blah blah blah.

Thingy Programming.

Matt H.
Friday, January 3, 2003

"Yes, Babs, your uvula."

Steve Wheeler
Friday, January 3, 2003

Matt - thanks much.

Steve - you might want to check out my discussion group on uvula-oriented programming at www. It's the Next Big Thingy.

X. J. Scott
Friday, January 3, 2003

Oops - there is a Heh. Not really mine though. Wished I'd had the foresight to grab it.

X. J. Scott
Friday, January 3, 2003

*  Recent Topics

*  Fog Creek Home