http://qs1969.pair.com?node_id=355067


in reply to Re: Re: Re: Re: Re: Re: Functional Inside Out Closure Objects
in thread Functional Inside Out Closure Objects

You keep using that word ("syntax"). I do not think it means what you think it means.

Syntax, as far as I know (and I am no linguist) is the arrangement of "words" into "sentences" as described by or conforming to a grammer. When I say "perl's OO syntax", I mean the various keywords/operators in perl that when combined in a certain way, create OO perl code. What do you think I am meaning when I say "syntax"? Please explain, or correct me if I am wrong in my thinking.

As for use base, yes you can look at it as a keyword with a space in it, but that does not make it a keyword. If you were stuck on a desert island with just an interpreter and no modules, you would have to revert to the ugly @ISA = qw(Bar); form (although I suspsect you would likely just implement your own base pragma).

Please note as well that I make my living writing OO perl code and enjoy I enjoy doing it very much. But having to work with it every day has convinced me that there is room for improvement.

-stvn

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Re: Re: Functional Inside Out Closure Objects
by jdporter (Paladin) on May 21, 2004 at 13:21 UTC
    Right. My point is that @Foo::ISA = qw( Bar ); is entirely different, syntactically, from use base 'Bar';. If you regard the former as ugly syntax, then the latter should make you happy. I'm still unclear why it doesn't.
    If you were stuck on a desert island with just an interpreter and no modules
    If I had internet access, I'd reinstall Perl, of course. But if I really did find myself in such a dire situation as you describe, the brokenness of my Perl code which depends on use base would probably be among the lesser of my worries.
      f you regard the former as ugly syntax, then the latter should make you happy. I'm still unclear why it doesn't.

      It does make me happy (which is kinda sick when you think about it), but my point really is that without external modules like base, the syntax is ugly. It is difficult to take external modules into account when evaluating the beauty of perl's OO since there are many modules out there doing much like what the OP's module does. To be fair to them, my assessment was of the bare module-less syntax.

      -stvn