On 22/09/05, Juerd <[EMAIL PROTECTED]> wrote: > I don't think +(~$pair) makes any sense, though. It's basically the same > as +(~$pair.key). It's probably wise to avoid that $pair can be confused > for its key or value. A good alternative is hard to find, though. I tend > to prefer 1 at this moment (coincidentally, that's +?$pair).
While having stringification on everything is quite useful (for debugging dumps, if nothing else), I'm wary of giving numification behaviour to objects that simply can't produce a meaningful value. If there's no (single) obvious interpretation of "turn a value into a number" for a particular type, then don't struggle to come up with a non-obvious one--I say just leave it undefined, or have it fail(), or whatever. Otherwise, if someone just says to himself "I think a pair is a collection of two elements, so it will obviously numify to 2" and then unknowingly gets `1` back, things can get confusing *real* quick. Stuart