Re: Please welcome . . .
From: | Mark J. Reed <markjreed@...> |
Date: | Monday, December 15, 2003, 1:17 |
On Sun, Dec 14, 2003 at 07:56:59PM -0500, Dennis Paul Himes wrote:
> Mark J. Reed> Hm. Perl array indices as language. Neat. :)
>
> Perl does that?
Yup:
$ ipl
perl> @a = (1,2,3);
123
perl> $a[0]
1
perl> $a[1]
2
perl> $a[2]
3
perl> $a[-1]
3
perl> $a[-2]
2
perl> $a[-3]
1
> I've actually studied Perl and written a few Perl
> scripts at work, but I'm by no means fluent in it and didn't know, or had
> forgotten, this feature. It wasn't an subconscious influence either, since
> I put this feature in Gladilatian before I know any Perl at all.
Just you and Larry Wall thinking alike, then. No big surprise - he's
had linguistic training and modeled many of Perl's features on natural
language, especially the expressiveness and plethora of synonyms.
-Mark