in reply to Re^34: Why? (each...)
in thread Why? (each...)

Don't be so literal, it's just a loose association to tie the three together. And I wouldn't call it a bad meme -- more like a mental trick or reminder to help get past a mental block. Sometimes it's more important to forge ahead and then circle back. Once he starts getting the assignments right things should start to become clearer, and he'll be ready to circle back and clear up any remaining misunderstandings. That's my take on it. That's based on my college experience where I had C before Assembler. Pointers were so confusing in C, but then they made sense in Assembler. Not a problem since then. And and as a side note, having C first may have made it easier to pick up on assembler (a lot of things "clicked"). Anyway, the Op can stay confused about () vs. {} in %hash= context, or he can get past that, and then later on learn that the parens are not so directly tied to lists after all. No offense, but the "(LIST)" pseudo-idiom does a pretty good job of getting people to a level where they can grasp what's really going on.

Elda Taluta; Sarks Sark; Ark Arks

Replies are listed 'Best First'.
Context Is Easy
by chromatic (Archbishop) on May 21, 2011 at 06:17 UTC
    ... the "(LIST)" pseudo-idiom does a pretty good job of getting people to a level where they can grasp what's really going on.

    I find that explaining to people what's really going on from the start—rather than pretending that context is some strange and scary thing that you only learn after a decade of experience—is rather easy. After all, anyone whose native spoken language has subject-verb number agreement already understands it.

    The notion that parentheses create some sort of first-class data structure known as a list is nonsensical in Perl, and it leads to strange misunderstandings and false cognates between other languages. Far better to avoid that mess altogether when the alternative is so much easier (and so much more accurate).

      Except that nice, correct, logical answers do not always help people. Based on posts made by sundialsvc4 he should already understand and know the answer. So what do you do in a case where the correct answer doesn't click? People are not perl interpreters.

      Elda Taluta; Sarks Sark; Ark Arks

        So what do you do in a case where the correct answer doesn't click?

        You find another ways to explain what are going on without lied.

        As I wrote, context are easy if you explain it correctly.

Re^36: Why? (each...)
by ikegami (Patriarch) on May 21, 2011 at 01:19 UTC

    And I wouldn't call it a bad meme

    Unfortunately, even after being shown that it is.

    more like a mental trick or reminder to help get past a mental block.

    [] (array ref) vs {} (hash ref) vs neither (array or hash) is far more accurate, and it's just as simple.

    Once he starts getting the assignments right things should start to become clearer

    Except that getting the assignments right is the context. It's rather useless to teach him something that he'll only understand once he learns it by some other means.

    Anyway, the Op can stay confused about () vs. {} in %hash= context,

    You're saying people don't need to know everything right out the door. That's true, but it doesn't apply here. The truth is actually simpler that the confusing misinformation he was given.

      Except that based on previous posts he should already know and understand the answer. So, when the correct answer doesn't click, then what? If someone has an irrational mental block, then what? IMO, better to get past that mental block and then return to the original problem later on. Otherwise there's a good chance you are tilting at windmills.

      Elda Taluta; Sarks Sark; Ark Arks

        So, when the correct answer doesn't click, then what?

        There's no reason to believe it didn't.

        IMO, better to get past that mental block and then return to the original problem later on.

        There's no way it's better to introduce a bug into every 10 hash initialisations.

        Anyway, this is a false dichotomy. Getting past the mental block doesn't not need to involve providing false information about parens.