I'm lazy when it comes to speaking code. I assume that my listener already knows Perl and so I can say what I want my code to achieve rather than worry about specific symbols. This is particularly true when I'm reading code to myself.

So, to take a simple example:

while (<>) { s/foo/bah/g; print $_ || "Nothing\n"; }
I'd say:
While diamond, substitute foo for bar; globally. Print it or the string Nothing with newline.
If I really have to spell it out, so to speak, I'd say:
while diamond, start block.
ess for'd slash literal foo for'd slash literal bah for'd slash gee, semi-colon.
print dollar underscore bar bar double quotes literal capital N, nothing; newline. close double quotes, semi-colon.
close block.

But I don't often have to spell code out like that.

I'd pronounce qq~...~; as queue queue tilde <whatever> tidle semi-colon, or preferably double quotes (queue, queue tilde) whatever end quotes.

# is hash or comment % is percent ! is shriek or bang ^ is caret or hat * is star
my punctuation pronounciation is rather boring.

jarich


In reply to Re: Spoken Code by jarich
in thread Spoken Code by andyf

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.