fucking spamassassin and their fucking memory-hog code.
SCALAR EACH IS YOUR FRIEND, DIPSHIT.
sheesh. I did *not* need to be optimizing code written by people I've never met. (EDIT: though technically, in my mind, addressing 'out of memory' errors that crop up under normal usage isn't optimizing anymore; it's debugginging.)
SCALAR EACH IS YOUR FRIEND, DIPSHIT.
sheesh. I did *not* need to be optimizing code written by people I've never met. (EDIT: though technically, in my mind, addressing 'out of memory' errors that crop up under normal usage isn't optimizing anymore; it's debugginging.)
no subject
on 2005-01-09 09:33 pm (UTC)Although it would be nice if Perl could recognize that, in for $x (keys %y) { foobar $x }, the array value of that keys %y is never actually used as such and so doesn't need to be constructed. I can understand if static analysis would be too much, but surely there's already enough runtime magic strewn about that this kind of thing can be tossed in. (For example, having while ($x = each %y) { foobar $x } not halt when the key is "0" or "".)
On the other hand, at what point does Perl stop being a scripting language and start being a DB query planner?
no subject
on 2005-01-09 09:47 pm (UTC)for $x (keys %y) { ... }
then we should be able to do it for
for $x (grep(/pattern/,keys %y)) { ... }
and, and, and!
(people just like me are why perl is the swiss army chainsaw.)
no subject
on 2005-02-04 09:13 am (UTC)(Bigger chainsaw!!!)
no subject
on 2005-01-13 11:59 am (UTC)In a lot of cases, you want to halt on false-evaluating values, and it's relatively simple to add a C<defined> operator.