Re: File Handles, Perl Naming, Agglutination in Natural Languages (Partly OT:)



ano 4000 rayden crc 2 per linda
[typeglobs]
open my $handle, $mode, $file
the thing stored in the handle is a whole type glob. Print and other
functions then magically use the file handle portion of that glob.
are directory handles yet another kind of "scalar type"?
No, dir handles appear as a special case of file handle, both are
accessed through (say) *main::HANDLE{ IO} as the case may be.
Umm interesting. Is this dirs are files in disguise part of Perl's Unix
heritage? I found it surprising as a user but some Unix man pages includedd
passages like "if a file is a directory" which let me conclude, ok I suppose
that's the case internally.

[Perl naming]
having read Larry Wall's essay on Perl's natural language principles at:

http://www.wall.org/~larry/natural.html

I wonder if Perl 6 will borrow even more from natural languages.

All of my Perl variables and comments are in English so far, though, so I
don't get to use all the fancy suffixes mentioned later on, <grin>. However,
I've tried using a kind of speech-synth friendly Hungarian notation to
denote the perl datatype in some way. I use singular words for scalars if
they aren't references to collections, plurals for arrays and the number 2
(read as the preposition to) to emphasize the kinds of mappings most hashes
are. Sometimes this can get very awkward and I scrap it after all. Hmm,
awkword would that be towards AWK as opposed to say Perlward <smile>?

Finally regarding compounds, I know programmers speaking English as a second
language who like to separate even the words in compounds, preferring to
write $postCard so the naming practices are absolutely clear to everyone.

[natural language OT]
contains much less compound words than Finnish does. But then again, the
perldocs ues just that and programmres tend to like $hashref better than
$hash_ref.
Heh, the gluing-together of words is one trait shared by our otherwise
widely unrelated languages , Finnish and German. It happens in English
Quite right, things like video card are compounds here but not in English.

In my entirely unqualified opinion, there is a
tendency in English (rather recent, as languages go), to make more
productive use of agglutination.
Off topic? What's that?
I think I've seen the term somewhere. Let me guess glueing together pieces
to words to give them new and well-defined meanings. Finnish uses a number
of such suffixes. One of them is sto denoting a collection of things.
"Kirja" (book) "kirjasto" (library), "laiva" (ship) "laivasto"
(both fleat and the Navy), "kone" (machine) "koneisto" (machinery). Needless
to say not all words can be treated like this, even if it would make sense.

--
With kind regards Veli-Pekka Tätilä (vtatila@xxxxxxxxxxxxxxxxxxxx)
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila/


.



Relevant Pages

  • Re: Teach me how to fish, regexp
    ... in article slrnbof3et.6nu.tadmc@magna.augustmail.com, Tad McClellan at ... > I remember when I first learned Perl too... ... Since he discusses "natural language" I'm wondering why he didn't write perl ...
    (comp.lang.perl.misc)
  • Re: Py3K idea: why not drop the colon?
    ... Unfortunately natural language is completely riddled with ambiguities ... about negation and conjunction. ... Similar negations of two English verbs with virtually identical meaning ... I think part of learning to think like a computer is learning to stop ...
    (comp.lang.python)
  • Re: How do you know if an English word is: verb, adj, etc.?
    ... Is there such a rule in ENGLISH? ... English is a natural language. ... became a verb. ... "In America only the successful writer is important, ...
    (alt.usage.english)
  • Re: my experience learning perl and common lisp so far
    ... Perl so far is hell because it seems to lack rhyme or reason. ... Lisp is, well, a natural language too, but it's like medieval ...
    (comp.lang.lisp)
  • Looking for semantic patterns in computer marketplace advertisements
    ... which deals with capturing a Natural Language ... English, ... understandable description of the advertisement deconstructing it with ... reference for this part of my study has been the book "Natural Language ...
    (sci.lang)