[Tutor] Is Parrot an April Fool's joke?
Daniel Yoo
dyoo@hkn.eecs.berkeley.edu
Mon, 2 Apr 2001 14:03:11 -0700 (PDT)
On Mon, 2 Apr 2001, Rob Andrews wrote:
> According to several articles found on the web (all dated the 1st of April)
> in places like perl.com, python.org, and oreilly.com, Parrot is a language
> in development intended to merge Python and Perl. Does anyone know what the
> story is?
>
> http://www.perl.com/pub/2001/04/01/parrot.htm
It's a joke. Read the example source code that GvR and LR show: it's
hilarious because it's so clunky and shows precisely what might happen in
a committee-driven language.
###
GvR: Obviously there aren't any full-size Parrot programs available at the
moment, just pieces of example code. This is an example written by Tim
Peters:
# copy stdin to stdout, except for lines starting with #
while left_angle_right_angle:
if dollar_underscore[0] =eq= "#":
continue_next;
}
print dollar_underscore;
}
LW: I think this shows exactly what we were trying to achieve: it's
immediately obvious to both Perl and Python programmers what that does.
We've got a great compromise between Perl's brace-structured blocks and
Python's white-space blocks; we've merged the names of language keywords
in an elegant way; we've kept the idea of Perl's shortcut variables, but
we've combined that with Python's readability.
GvR: Of course, this is just one way you could write that program. There's
more than one way to do it, right, Larry?
LW: Sure. I'd probably write the program something like
this:
while(@line = Sys::Stdin->readline()):
continue_next if $line[0] =eq= "#":
print @line;
}
###