On Jun 30, 2008, at 3:19 PM, Paul McNett wrote:
> The failure is at the point of the problem, making it very easy to
> understand what's going on.
I guess I don't see the current situation as all that confusing or
hard to track down. Since I'm at work now I can't fire up Dabo and
start debugging; I was planning on doing that tonight when I got home.
It also isn't reasonable to assume that we know just those places
where there may be incorrect types. We would then have to adopt the
convention of adding asserts to all of our code. My personal belief is
that these sorts of asserts are for testing values supplied via
external sources; if it's coming from our own code, then the problem
is the code, and that's what we should focus on.
> But my real question was more general: do we enforce correct types
> to be
> passed, or do we coerce to the expected type?
It depends. In the case of values coming from XML attributes, we
don't have a choice: everything needs to be stored as a string.
However, those string values should be converted to the correct type
before assignment. We shouldn't have type coercion in our setters as a
general practice.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]