Indeed I would get that pedantic. :-) Although I would say that IMO the fudge involved in Array of Hashes or even the even worse List Of Lists or List of Hashes is far more palatteable than the fudge involved in calling our a declaration. The problem to me is that the "standard" english usage is quite different from the usage in computing. In english we consider a declaration to be a statement of fact or a statement of an assertion, or an intention. In computing we usually mean the declaration of the existance of a particular object, and the name to which we shall call it. This is a pretty serious additional meaning, and I've seen a lot of newbies stumble over the distinction.

I realize you have a lot more experience than I do teaching perl, but I wonder if you think about it how often you've had students say "Ok so 'my' creates a lexical variable and 'our' creates a global variable?" Umm no. "So strict catches usage of nonexistant variables?" Umm no. You see what i mean?

Wheras the AoH LoL etc, is a much simpler and easy to explain distinction. Especially when you have Data::Dumper to easily show them the difference/sameness in a visual way. Although I do feel that it is far too easy to blur the concept of the container and the contents of the container in perl. But again I dont think these conceptual problem are much of anything unless you start hacking internals or doing funky mojo.


---
demerphq

<Elian> And I do take a kind of perverse pleasure in having an OO assembly language...

In reply to Re: &bull;Re: On Declaration by demerphq
in thread On Declaration by demerphq

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.