View · Search · Index
No registered users in community xowiki
in last 10 minutes

Re: [Xotcl] Asserts off/on

From: Kristoffer Lawson <>
Date: Sat, 15 Jul 2006 18:19:19 +0300

On 15 Jul 2006, at 18:02, Gustaf Neumann wrote:

>> But would it be useful to have this kind of functionality in the
>> core too?
> well, as long we can do such kind of things with a few lines of
> code in xotcl
> i see not need for hacking this into C. xotcl is sometimes
> criticised for having
> already a too large set of predefined methods...

Well yeah, I guess one needs to be careful with that. Certainly there
are areas where simplicity is a virtue, and perhaps there are some
overlapping areas, but I just thought of it as a pretty natural
extension of the current "check" functionality. To me it would feel
more natural for a "cover everything" check than for the current per-
object style. Usually one works on a development version where all
debug options and checks are turned on — you want to capture anything
as soon as it happens. Then you turn them off for a delivery version
(if for no other reason than to enhance performance). As with most
functionality in XOTcl there is the 'inst' methods, which are often
given to classes, and then the direct ones for objects. Thus it would
seem logical to have that for asserts as well.

Neither of our solutions are really the kind of thing basic coders
would come up with.