dan said:
I am interested in teaching Perl programming to linguistics BA students
That would be cool, given the linguistics background of
Perl's creator (Larry Wall).
See "Natural Language Principles in Perl":
http://www.wall.org/~larry/natural.html
After covering "list vs scalar context" in Perl training classes,
when there are lots of furrowed brows, I try to ease the students
minds by pointing out that they do this "context thing" every
day already. It is not new or scary.
It's just that they are used to doing it in natural language
rather than in computer language. I give this example:
Give me a fish.
Give me several fish.
Where "fish" has 2 different meanings, the 1st in a singular noun
and the 2nd is a plural noun.
How do we tell which meaning to assign to "fish"?
By looking at what's around the word "fish" (ie. it's context).
Perl has the concept of singular (scalar) and plural (list).
Then, if I see mostly smooth brows, I rile them up again with:
I like to fish.
Where it has yet another meaning, a verb.
The natural-languageness of Perl makes is a sub-optimal language (IMO)
for teaching CS fundamentals though.
who have no knowledge of programming.
Ugh. That will be the hard part, as you will need to teach some
fundamentals of general computer science, which will not be
included most programming language tutorial materials...