Non-optional ejectors
From Erights
(Difference between revisions)
Kevin Reid (Talk | contribs) (describe proposal) |
m (record approval) |
||
Line 8: | Line 8: | ||
* Thread starting at [http://www.eros-os.org/pipermail/e-lang/2005-December/011036.html Type system edge cases: underenthusiastic deflection or individual bugs?], Sat Dec 3 19:58:21 EST 2005 | * Thread starting at [http://www.eros-os.org/pipermail/e-lang/2005-December/011036.html Type system edge cases: underenthusiastic deflection or individual bugs?], Sat Dec 3 19:58:21 EST 2005 | ||
* [http://www.eros-os.org/pipermail/e-lang/2005-June/010708.html Exception types and ejector patterns (was Re: Remaining semantic issues)], Tue Jun 7 09:48:29 EDT 2005 | * [http://www.eros-os.org/pipermail/e-lang/2005-June/010708.html Exception types and ejector patterns (was Re: Remaining semantic issues)], Tue Jun 7 09:48:29 EDT 2005 | ||
+ | * '''[[User:Markm]] approved of this proposal in discussion on [[IRC|#erights]] at 2009-01-04 00:39 EST.''' | ||
==See also== | ==See also== | ||
* [[ExitFunction]] | * [[ExitFunction]] | ||
- | [[Category: | + | [[Category:Resolved design issues]] |
Latest revision as of 14:18, 4 January 2009
User:Kevin Reid proposes that everything which is currently optEjector :nullOk[OneArgFunc]
should instead be ejector :OneArgFunc
, where the object throw is used instead of null to indicate not using an ejector. (The interfaces are compatible, in that both ejectors and throw
support .run(:Exception).)
He considers the advantages to be regularity in many places: code to make use of an ejector is simpler, explanations need not mention null, and the type is simpler.
E-on-CL implements this proposal.
Discussion
- Thread starting at Type system edge cases: underenthusiastic deflection or individual bugs?, Sat Dec 3 19:58:21 EST 2005
- Exception types and ejector patterns (was Re: Remaining semantic issues), Tue Jun 7 09:48:29 EDT 2005
- User:Markm approved of this proposal in discussion on #erights at 2009-01-04 00:39 EST.