in reply to Re^6: Write code diferently
in thread Write code diferently

The relevant section is about programming style, not efficiency or performance.

Oh, its 'style advice'. It's perfectly fine to cargo-cult that(*).

Does the book have any opinion on whether I should be wearing a full beard with my knee-crutched jeans or just 3-day stubble?

(*)My point being, that you are still passing on information you have read, as advice or preference or law, without having examined the reasoning behind it, or having applied your own reasoning to it; or concluded that it is good advice, preference or law on the basis of your own experience.

I occasionally suggest or recommend the use of strict and/or warnings. I do so, not because I've read that they should be used, nor even because someone told me it is a good idea; but because I personally have found them useful to me. And when I do so; I demonstrate what benefit the OP would have accrued from doing so.

But nowhere have you even attempted to reason (beyond "looks a bit clunky"; and you read it in a book) why you think my use of map is suboptimal. That's cargo-cult.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^8: Write code diferently
by Laurent_R (Canon) on Aug 24, 2013 at 18:15 UTC

    You are misrepresenting what I have said, and it starts to look deliberate.

    My point being, that you are still passing on information you have read, as advice or preference or low, without having examined reasoning behind it, or having applied your own reasoning to it; or concluded that it is good advice, preference or law on the basis of your own experience.

    This is not so. I only made a two-line post just trying to understand why the OP wanted to change the map in the code presented, and saying that, in my personal opinion, a for or foreach construct would be clearer in that case. Not that I read it somewhere or someone told me, my own experience tells me that this is the case.

    In my next post, I said this:

    I was just expressing a matter of personal taste that it may not be the best style. Others may have different opinions on that.
    Still not repeating something I have read, stating clearly that it is a personal opinion of mine.

    I am forced to quote the official Perldoc map documentation and the Camel Book only because you are tweaking the map functionality by saying something like:

    map maps a function over a list; optionally returning a new list.

    There, you are basically making the claim that the return list is a secondary effect of map. This claim is just preposterous and you know better than that. BTW, another quote from the official Perldoc documentation on map:

    Map always returns a list.
    But quoting the official documentation is probably just repeating cargo cult, isn't it?

    And the only reason I said that the quote from the Camel Book was in a programming Style section was just to set the matter straight that it was not previous section on efficiency and performance.

    I am sorry that this discussion turned this way, I certainly did not want to have this type of argument with you. Again, I respect very much your opinions, but that does not mean that I have to agree will all of them. Agreeing with everything you said might indeed be repeating cargo-cult, I have enough experience to have my own opinion. I do not think that I want to continue arguing. You may have the last word.

      . BTW, another quote from the official Perldoc documentation on map: Map always returns a list.

      Regardless of the provenance, that information is wrong. The difference between reading and knowledge.

      I gave you an out; but you continue to hide behind irrelevant meta discussion.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.