[E-Lang] E Project, Documentation, and new programmers
zooko@zooko.com
zooko@zooko.com
Thu, 12 Apr 2001 12:56:35 -0700
Tyler wrote:
>
> I think the best solution here is actually to deviate from the expression style
> syntax and have an explicit "return" keyword. Then it would be perfectly safe
> to have the default guard be ":any". I am not sure, but I think following this
> path would also make it possible to have E loops terminate with a return rather
> than throwing an exception.
Please see my "proposal for lexically limited retvals in an expression
language":
http://www.eros-os.org/pipermail/e-lang/2001-March/004772.html
As far as I know it does exactly the right thing, and best of all it is
perfectly backwards compatible with E v0.8.9 -- any program in E0.8.9 will run
exactly the same way in a version of E that implements this proposal.
I think that this is very important, after my experiences trying to upgrade
echat.e, I've concluded that the default ":void" guard is a source of much
frustration to programmers. What happens is that you get null pointer
exceptions in your code, and you have no idea why. Even if you *do* clue in
and guess that you must have left a default guard somewhere that you didn't
mean to, it is still a hassle to track it down.
BUT, since my proposal is so simple, orthogonal to other current issues, and
backwards compatible, I am happy to prioritize other issues for now.
Regards,
Zooko