[prev] [thread] [next] [lurker] [Date index for 2005/10/13]
On Thu, 13 Oct 2005, Abigail wrote: > When it comes to hating significant whitespace, nothing comes close to Perl6: > > sub square {my $x = shift; return $x * $x} > print square(1) * 2 # Prints 2. > print square (1) * 2 # Prints 4. > > > my %hash; # Empty hash. > if %hash{1} {print "Found it"} # No output. > if %hash {1} {print "Found it"} # Prints 'Found it'. I'm not sure who wins, this crap from perl, or the fact that a trailing comma affects how 'print' functions in python: print "this is a test" print "another test" print "a third test", # notice the trailing comma print "a fourth test"' Yields: this is a test another test a third test a fourth test Yes, a trailing comma determines whether 'print' adds a carriage return for you. I can't even imagine how painfully difficult it must have been to write a parser that can somehow tell functions whether they were called with a trailing comma, considering that a comma (at least in this context) is usually entirely for the parser -- they wouldn't even be there if the parser didn't need them, and they're only used by the parser. I'm not saying I don't understand _why_ you'd want two forms of the 'print' function, I'm just saying this way makes my eyes bleed, and does a great job of summing up why I do not now and never will use python except under duress. > I rather take all Pythons significant whitespace rules (which aren't > that bad, and wouldn't require me to change my coding style) repeatedly > than Perl6 whitespace rules (which conflict with almost every line I > write) once. Yeah, it's not python's whitespace that makes me avoid it like the plague. "Ooh, we're OO, except that we're functional, except, when we just make shit up, except... at least we're not perl!" I sweat, I've found someone able to describe what they _liked_ about python without comparing it to perl. It makes python-ruby script wars difficult: me: ruby is awesome them: perl sucks! me: Bartender! Check, please! > Evil rules. Pure evil. Hates doesn't come close to describe it. > > > Abigail (not touching Perl6 with a 10-feet pole). I am looking forward to perl 6 like some people look forward to new episodes of 'Cops'. If Ruby looks good now, just imagine how good it will look when Perl 6 comes out. "See, we've added new punctuation, to help solve the fact that there was too much punctuation, and in order to make it easier to understand, we've tripled the number of valid statement types." Like a 100 car pileup on an 8-lane highway. I just hope Ruby is ready to accept all of the refugees. :) -- It has recently been discovered that research causes cancer in labratory rats. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://config-mgmt.blogspot.comThere's stuff above here
Generated at 20:00 on 17 Oct 2005 by mariachi 0.52