[UI] Compiler messages
Bill Schwab
BSchwab at anest.ufl.edu
Wed Nov 14 14:54:56 UTC 2007
Colin,
I respectfully disagree. Exceptions shine when a problem is detected
(e.g. end of stream) in code that cannot be expected to know how to
handle it. Exceptions both propagate the information to a level that
can be expected to cope with it, and prevent silent failures by faulting
if the exception is not handled. That is exactly what is required in my
medical data parsing example. In the case of the compiler, it can (and
I submit should) all be handled with messages to a context since the
scenario is fairly focused.
This is both a concern of mine (ensuring robust stream behavior in a
critical and complex system) and something of a long-term agenda to
avoid wasteful programming. Bloatware happens a few bytes and
microseconds at a time.
Again, in the compiler example, I agree with the plan, but see it as a
clever way of compensating for configuration management deficiencies
rather than being an appropriate technological choice.
Bill
Wilhelm K. Schwab, Ph.D.
University of Florida
Department of Anesthesiology
PO Box 100254
Gainesville, FL 32610-0254
Email: bschwab at anest.ufl.edu
Tel: (352) 846-1285
FAX: (352) 392-7029
>>> cputney at wiresong.ca 11/13/07 7:14 PM >>>
On 13-Nov-07, at 2:47 PM, Bill Schwab wrote:
> Agreed, with the caveat that I am currently thinking contexts are
> preferred to exceptions in this case (for speed). Of course, that
> would
> require changing a LOT of code, where the exception solution can be
> stealthy. Changing default actions is a worthy compromise. I will
> take
> a shot at it.
Tim is right, speed is just not an issue here. Exceptions only get
raised if the compiler is in "interactive" mode, as when invoked from
a browser. In that case, compilation takes milliseconds, and adding a
few microseconds doesn't matter. Further, if the exception handler
interacts with the user, the time to raise an exception is dwarfed by
the time spend waiting for the user to react.
Colin
_______________________________________________
UI mailing list
UI at lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/ui
More information about the UI
mailing list