Re: easy-when-binds-return

Kevin Reid <kpreid-M/[email protected]> Thu, 20 Oct 2011 08:59:33 -0400
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
On Oct 20, 2011, at 8:12, Thomas Leonard wrote:

> People often try to use return inside when blocks. Currently, this just 
> produces confusing "Ejector must be enabled" errors.
> 
> How about requiring the use of "return" to return a value from a when block?

No.

We used to do that (along with otherwise treating the when-block more like a function), and decided it was too heavyweight and confusing. This makes 'when' more like other control structures. In particular, it is more like the user-defined control structures of the "lambda-args" pragma; we *expect* to find more "eventual control structures" to want.

I will not support any change to 'when' which moves it farther from the semantics expressible by lambda-args.

I am also against making E more 'imperative style' given that it's not going to stop being a hybrid.

-- 
Kevin Reid                                  <http://switchb.org/kpreid/>