🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #4332

Re: Readable Perl (was: Re: Relative Speed of Perl vs. Tcl vs. C)

#4332
From: Matthew B. Kennel
Date: Tue, 20 Feb 1996 00:12
45 lines
1727 bytes
Randal L. Schwartz (merlyn@stonehenge.com) wrote:
: >>>>> "John" == John Viega <jtv2j@mamba.cs.virginia.edu> writes:

: John> People bitch about the readability of Perl non-stop.  In fact, I have
: John> heard the joke, "Perl, the only language you can uuencode, and not
: John> notice" twice this week around the department.

: OK, now which do you find most readable...

: 	$i = 1;
: 	while ($i <= 10) {
: 		print "I can count to $i\n";
: 		$i++;
: 	}

: 	for ($i = 1; $i <= 10; $i++) {
: 		print "I can count to $i\n";
: 	}

: 	foreach $i (1..10) {
: 		print "I can count to $i\n";
: 	}

: 	$i = 0;
: 	print "I can count to $i\n" while ++$i <= 10;

: 	print map "I can count to $_\n", 1..10;

: 	50 FOR I = 1 TO 10
: 	60 PRINT "I CAN COUNT TO ",I
: 	70 NEXT I


This one:

loop #OUT + "I can count to " + 1.upto!(10) + "\n"; end; 

Or, 

loop #OUT + "I can count anything: " + collection_class.elt!.str + "\n"; end;

Sather. 


http://www.icsi.berkeley.edu/~sather. 
Technical Details
Message-ID: <4gb3kp$lu7@gaia.ns.utk.edu>
Path: arc1-ca.pugleaf.net!coke.engr.utk.edu!mbk
References: <4e3a2u$eoa@wcap.centerline.com> <4e54vc$7sk@orac.mon.rnb.com> <ukd97hwzkc.fsf_-_@linda.teleport.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!coke.engr.utk.edu!mbk
From: mbk@I_should_put_my_domain_in_etc_NNTP_INEWS_DOMAIN (Matthew B. Kennel)
Newsgroups: comp.lang.misc,comp.lang.perl.misc,comp.lang.tcl,comp.lang.c,comp.lang.java
Subject: Re: Readable Perl (was: Re: Relative Speed of Perl vs. Tcl vs. C)
Followup-To: comp.lang.misc,comp.lang.perl.misc,comp.lang.tcl,comp.lang.c,comp.lang.java
Date: 20 Feb 1996 00:12:09 GMT
Organization: University of Tennessee, Knoxville
Message-ID: <4gb3kp$lu7@gaia.ns.utk.edu>
References: <4e3a2u$eoa@wcap.centerline.com> <4e54vc$7sk@orac.mon.rnb.com> <ukd97hwzkc.fsf_-_@linda.teleport.com>
Reply-To: kennel@msr.epm.ornl.gov
NNTP-Posting-Host: 128.169.100.253
X-Newsreader: TIN [version 1.2 PL2]