>>>>> "NC" == Nicholas Clark <[EMAIL PROTECTED]> writes:

  NC> If junctions are sets, and so a|b is identical to b|a, then isn't
  NC> it wrong for any implementation of junctions to use any
  NC> short-circuiting logic in its implementation, because if it did,
  NC> then any active data (such as tied things will side effects) may
  NC> or may not get called depending on whether a junction happened to
  NC> be stored internally with a first, or with b first?

  NC> (unless the implementation can prove to itself that nothing it's
  NC> dealing with has side effects, so short circuiting will have no
  NC> effect. Of course, this is an implementation detail, and aside
  NC> from speed, must not be determinable from outside)

it also depends on the junction function :). i would think one() would
need to check all the elements. but i agree with you about a junction
being an unordered set. you have to treat it that way to make sense
since you can add elements to a junction (can someone clue us in with a
code example?). on the other hand we expect 'and' and friends to short
circuit and execute from left to right and that is taken advantage of in
many ways. so i say 'a or b' is not semantically the same as 'a | b' in
that there is no guarantee of order in junctions. but there is no
guarantee of evaluating all of the elements in a junction, it can short
curcuit as soon as it can determine a correct boolean result (assuming a
boolean result is wanted).

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Reply via email to