in reply to Re^5: Perl Style: Is initializing variables considered taboo?
in thread Perl Style: Is initializing variables considered taboo?

My intention is to have a consistent terminology,

It doesn't worth it discussing things if everyone has his own vocabulary.

Talking about our, state, local I disagree. The term "scope" can be characterized as dynamic OR static, it has compilation and runtime aspects.

Just grep thru the perldocs.

But since we both exactly know how they work I'll quit this discussion.

Cheers Rolf

PS: maybe worth a look http://perldoc.perl.org/perlglossary.html

Replies are listed 'Best First'.
Re^7: Perl Style: Is initializing variables considered taboo?
by BrowserUk (Patriarch) on Aug 21, 2010 at 17:37 UTC
    Talking about our, state, local I disagree.

    Then you are wrong!

    The term "scope" can be characterized as dynamic OR static, it has compilation and runtime aspects.

    True. But that has no affect on how those keywords affect scope.

    • our limits visibility, not scope.

      our only affects dynamically scoped variables. Their scope remains global, our just makes them visible within the current lexical context.

    • state persists scope, not limits it.

      It allows a lexical variable to retain its value beyond its lexical lifetime. It extends rather than restricts it.

    • local limits scope temporarially, but not reliably.

      If you localise a (dynamic) var, but then call some sub or method that uses it without localising it, you get screwed over.

    But since we both exactly know how they work

    Hm. Do you? It doesn't seem that way.

    I'll quit this discussion

    Good idea.

      Well, I thought I could learn anything new when I asked why your limiting to "my".

      > > I'll quit this discussion
      > Good idea.

      ... and once again I wasted time! :(

      Cheers Rolf