[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Eliminating whitespace does not usefully shorten code



I must agree with the origonal poster. There is no extra "fun" value in
removing whitepsace.

Consider:

	$a = 0;
	$b = 1;
	$c = 2;
	while (<STDIN>) {
		$a++;
		$b += $a;
		$b++;
		$c += $b;
		$c++;
		$a += $c;
	}
vs.
	$a=0;$b=1;$c=2;while(<STDIN>){$a++;$b+=$a;$b++;$c+=$b;$c++;$a+=$c;}

Yeh, one's harder to read. But a code formatter will fix that. Not much
obfuscation.

The real fun with perl would be to (for example) use STDIN in list context,
count it, and then use some math to get $a, $b, and $c. Or something better.

Let's not substitute fake FWP for real FWP!



==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe