Simon Cozens wrote: > ...and I don't know if macros are actually objects and can be tossed > around, or if they're just part of the compilation process.
they have their proper place in the diagram Larry put in A6. furthermore, he says: "These syntactic forms correspond the various Routine types in the Code type hierarchy" so Macro seems to be at least a type. which leads me to the question: is Macro "also" a class? and which is the difference between a type and a class? hm, I guess this will be answered in A12, so I'll probably have to wait on this. I also have another question (probably related, and probably also for later). consider this: sub mygrep( Code &block, [EMAIL PROTECTED] is rw ) {...}; sub mygrep( Block &block, [EMAIL PROTECTED] is rw ) {...}; sub mygrep( Routine &block, [EMAIL PROTECTED] is rw ) {...}; sub mygrep( Sub &block, [EMAIL PROTECTED] is rw ) {...}; sub mygrep( Method &block, [EMAIL PROTECTED] is rw ) {...}; is something like this allowed? and what is the meaning then? if logic serves me correctly, this shouldn't work: sub mygrep( Routine &block, [EMAIL PROTECTED] is rw ) {...}; mygrep { $_ < 2 }, 1, 2, 3; because { $_ < 2 } is a Block, not a Routine! it should be written like this: sub smaller_than_two ($value) { return $value < 2 } mygrep smaller_than_two, 1, 2, 3; but this doesn't seem to make much sense. one should probably have said 'Code &block' (or '&block' alone, which I suppose is just the same), but then what's the use of 'Routine', 'Sub', 'Method' etc. as types? also, it's not clear to me the distinction between isa-relationship and namespace. I see that 'Rule' (and I presume 'Sub', 'Routine', 'Code', etc.) are all type names, but I wonder if 'Bare' is a type of its own -- or it is 'Block::Bare'? the latter sounds much better :-) in my class hierarchy I mixed 'probable' isa-relationships (eg. Sub isa Routine isa Code) with 'probable' proper namespace hierarchy (eg. Exception::Control::return, not return isa Control isa Exception). and this is probably very, very wrong. or maybe I'm just playing with dangerous toys that aren't intended for a little kid like me :-) > I think Type should be called Value, and that arrays should possibly > be a mixin of lists, but apart from that it looks fine. Oh, and you > missed out Grammars; ... thanks, applied :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;