ralphmelton: (Default)
[personal profile] ralphmelton
This repeated use of only the first thing returned by an iterator is evidence of poor design.
If there can only be one, don't use an iterator.
If there could be more than one, do your thing for each of them.

Date: 2001-09-24 12:07 pm (UTC)
cellio: (Default)
From: [personal profile] cellio
Here's a scary thought: what if the first one is different somehow, and it's not an iteration over equals, so to speak?

I'm not saying it's the case here, but I can't say I would be terribly surprised if the first value contained, say, meta-data about the others.

Date: 2001-09-24 12:33 pm (UTC)
From: [identity profile] ralphmelton.livejournal.com
I've got to say that that would suck too.

(In the cases I'm grumbling about, we're talking about inputs and outputs on nodes in an analysis tree. Most nodes do have a single input site, and non-filter nodes have a single output site, but it's icky to assume that things are so all over the place. Or rather, it's icky to have started with a more general premise and then to be sabotaging that generality by assuming that a special case holds.)

Profile

ralphmelton: (Default)
ralphmelton

April 2018

S M T W T F S
1234567
891011121314
151617181920 21
22232425262728
2930     

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 25th, 2025 06:25 am
Powered by Dreamwidth Studios