[Purdue-pm] Perl 6

Mark Senn mark at purdue.edu
Tue Sep 11 06:23:51 PDT 2018


A good Perl 6 Resources web page is at
    https://perl6.org/resources

A good summary of Camel, Hungarian, Kebab, and Snake variable naming
conventions is at
    http://www.wellho.net/mouth/4611_Hungarian-Camel-Snake-and-Kebab-variable-naming-conventions.html

Perl 6 allows kebab case variables like $number-of-people (get it?,
shish kebab), which for me is much easier to type and read than the
snake case $number_of_people.  (I started using kebab case when taking a
COBOL class at Purdue in the late 1970s and developed a fondness for it
then.)  In real life I'd name this $np if the program where just about
people or $npeople if the program had more than one variable name that
started with "p".  A long time ago I started using camel case for names
of subs I write like Cos, ArcCos, and ReverseColorMap.  The bigger a
program is the longer I like to make variable names.  And if others will
be looking at the program I am more likely to use longer variable name.

From http://sixfix.nigelhamilton.com
    SixFix is a weekly email with something new to learn about Perl 6. But
    there's a catch! Each email includes a coding challenge and a question
    about Perl 6 you must answer to receive your next SixFix.  I've only
    done the first exercise but I recommend it.

Mark Senn, Systems Programmer, Engineering Computer Network, Purdue University


More information about the Purdue-pm mailing list