I like to think in terms of objects, interfaces and patterns whenever I can. Also when working with Tcl
There are entities that appear to have an obvious nature and the in the development process they turn out not to be as obvious as they looked at first, and you regret you didn't make them objects with a carefully concealed implementation from the very beginning. A cautionary attitude, perhaps too wary. Speaking of the '::rivet::headers set <key>' command that must return the value associated to <key> in the headers. What's your preferred behavior when there is no value associated to <key>? Empty string or error? I prefer to catch errors even though the overheads are higher -- Massimo On 12/19/2014 11:35 PM, Damon Courtney wrote: > If you really, really want to create a separate command for checking > errors, then ::rivet::err seems the likely candidate. This is Tcl, > we’re not here to save a couple extra vowels. :) > > That said, I don’t really know that you need it. Tcl’s ::errorCode > variable is exactly what we’re talking about here, and it’s nothing > more than a list with a CODE + some extras. Returning a dict is a > perfectly Tcl’ish thing to do. > > D > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
