Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Re: Re: Re: Functional Inside Out Closure Objects

by stvn (Monsignor)
on May 20, 2004 at 15:36 UTC ( #355056=note: print w/replies, xml ) Need Help??


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

I am familiar with base, but the base pragma is an addition to the perl OO syntax not part if the actual syntax itself. Like I said, I would rather it be either a keyword like extends or it be part of the class declaration process (of which there really is none, its just a package declaration, and bless makes it a class).

-stvn

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Functional Inside Out Closure Objects
by jdporter (Canon) on May 20, 2004 at 16:12 UTC

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

    There's no reason you can't think of use base as a keyword with a space in it.

    Note, I'm not necessarily disagreeing with your complaint about the mechanics of Perl's OO... although I happen to be quite fond of it.

      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
        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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2020-09-29 13:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (146 votes). Check out past polls.

    Notices?