Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Finally? :)

    What have you against the say function?

    cheers and happy new year.
    • Because it sacrifices meaning and intuitiveness for a relatively small huffman advantage, mainly relevant only to people writing lots of console apps that print to stdout.

      • Illegal procedure, user number #5735, use of the word "intuitive" to describe programming languages. 15 yard penalty. Repeat the down.

        • I see your jingoism and demand an appeal to the third umpire.

          Wikipedia: Intuition (knowledge) - understanding without apparent effort

          "Intuitive" is a perfectly proper concept to use, with the understanding that all intuitiveness is relative. A programming language is no more special than any other tool in this regards.

          The concept of universal intuitiveness is of course wrong when applied to programming languages.

          But people likely to encounter "say" come from 4 states across 2 dimensions.

          1. People that know English, or don't

          2. People that know other programming languages, or not.

          If you don't know English, and you don't know programming languages, "say" is better than "printf", as only the huffman advantage is relative. But neither is intuitive.

          For someone that knows English but not programming languages, printf at least contains a recognizable word, complicated by the weird "f". But you can see that in the console sense it is relatively straight forward analogy, as it is printing characters to a surface.

          But "say"? I imagine (if I didn't understand how complicated it would normally be to implement) I would initially expect it to maybe invoke a text to speech engine and literally "say" my line.

          say "Of course intuitive is a valid concept";

          If you already know other programming languages (including Perl 5) then you recognize "printf" immediately. Say is going to be totally different to anything you have already seen, and they are TOTALLY unrelated...

          "say is print but with an extra newline"

          Huh?

          And if you know English AND programming languages, it doesn't make sense on both aspects.
          • allright i see the problem that people read the word say and do not really know what it does exactly, even if i believe i don't get your point fully. i think at least it's a lot better then ruby puts :).

            And to be honest, to me it makes intuitively perfectly sense. because printing do machines. they do it correctly, like told without adding something. but people say things with pauses sound in the voice so you can here where is a period or end of a thought. like the bubbles in comics. and tha first thing tha