The halt code is a mess. There are several open issues and should be several more. Here's what I found today...
1. Object>>setHaltOnce and friends are misleading See http://code.google.com/p/pharo/issues/detail?id=2621 All the accessors for the global HaltOnce are on the instance side of Object, making it unclear whether haltOnce and especially haltOnCount: are per-object or global. I suggest they be moved to some object representing the system (like SmalltalkImage or a delegate - I know we're trying to clean SmalltalkImage). #haltOnce Smalltalk haltOnceEnabled "used to be self haltOnceEnabled" ifTrue: [Smalltalk clearHaltOnce. "used to be self clearHaltOnce" ^ self halt]. makes it obvious that this is a global property, not per-instance. The first requires a comment (as indicated by the pending issue), the second is documented by the code. 2. Using Object to halt causes bloat, and doesn't buy much (except that's how we've always done it). See http://code.google.com/p/pharo/issues/detail?id=2394 for a proposal to change from "self haltOnce" to Halt once. 3. Is anyone using the versions that take a string message (e.g. #haltOnce:). A halt brings you into a debugger, so is the extra info worth the added complexity? p.s. right now, the versions are cut-and-pastes of each other I've already started to clean all this up and write tests, but wanted to be clear what the right direction is. Cheers, Sean -- View this message in context: http://forum.world.st/Halt-tp3774723p3774723.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
