Re: RFC 189 (v1) Objects : Hierarchical calls to initializersanddestructors

[email protected] (Damian Conway) Tue, 5 Sep 2000 09:38:01 +1100 (EST)
Newsgroups perl.perl6.language.objects
Message-ID <[email protected]>
   > Given that is happens when bless is called and that all other builtin
   > methods are anmed after what is being called, not what it is being used
   > for, then I would say that it should be called BLESS for consistancy reason.
   > 
   > this may seem confusing because you are thinking of one particular use
   > that you have in mind for this, but in a generic sense it is a method
   > that is called when bless is called.

To me this points out the flaw in the entire naming scheme, not in my 
dissent :-)

I would much prefer to see:

	PRINT   become  PRINTING    or  ONPRINT
	PRINTF  become  PRINTFING   or  ONPRINTF
	DESTROY become  DESTROYING  or  ONDESTROY
	BLESS   be      BLESSING    or  ONBLESS

I realize this won't happen, but one can dream.

As it is, I intend to propose BUILD and REBUILD as the initializer
names, and mention BLESS/REBLESS as popular alternatives.

Ah, well, if worst comes to worst I can always (under RFC 128) write:

	sub on (""subname, &subbody) {
		*{caller()."::$name"} = $subbody
	};


	on BLESS {
		...
	}

	on PRINT {
		...
	}

	on DESTROY {
		...
	}


:-)


Damian