Loading ...
Sorry, an error occurred while loading the content.

12Re: [extremeperl] Testing, Audience, etc.

Expand Messages
  • Tom Brown
    Jan 29, 2002
    • 0 Attachment
      > > >
      > > > $second_arg = 35 if int(@_) < 3;
      > >
      > >
      > > So, you only use it, because it is more descriptive?
      >
      > I guess so. perhaps all of the examples I have seen used int() on
      > arrays. It seems intuitive to me as well.

      but it's not. An array in a scalar context is the number of elements in
      it. I don't need to tell you that, your knowledge of the language is
      better than mine....

      adding the int() function makes me look at _why_ you are adding the
      function, and try to find the twist that needs it. There isn't one, so
      I've wasted time figuring that out. That is why I prefer either scalar()
      or nothing.

      Obviously, it's mostly a matter of style. Does it matter? I can't answer
      that. For the book to be used/popular you probably want to try to code to
      your target audience. No individual can claim to represent that.

      -Tom
    • Show all 20 messages in this topic