Non-optional ejectors

From Erights

Revision as of 14:18, 4 January 2009 by Kevin Reid (Talk)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

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

See also

Personal tools
more tools