[e-lang] Exception types and ejector patterns (was Re: Remaining semantic issues)
Kevin Reid
kpreid at mac.com
Tue Jul 25 15:01:05 EDT 2006
On Jul 22, 2006, at 21:07, Mark S. Miller wrote:
> Kevin Reid wrote:
>> ... to not use null as the 'don't eject, just throw' value,
>> because it requires an explicit conditional by the recipient ...
>> Instead, what if we simply pass 'throw' as the argument? This will
>> work because throw has a run/1 method ..., is more informative
>> when reading code, and eliminates the need to check whether
>> 'optEjector' is null ...
>
> I don't know why I've been resistant to this. On re-examination, it
> seems reasonable to me, and a better style than use of null. ...
> During the transition, methods that had accepted a null should
> continue to do so. Let's change all the callers before we change
> any of the callees.
I am working on this change for E-on-CL, with a warning if
throw.eject is given null.
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang
mailing list