On Thu, Apr 1, 2010 at 5:34 AM, Michal Suchanek <[email protected]> wrote:
> On 31 March 2010 20:21, Jonathan S. Shapiro <[email protected]> wrote:
>> In BitC, we chose to resolve this by deciding that a missing else
>> clause was treated as "else Unit". That is: a one-legged if must
>> return unit. I suppose that we could do the same thing with the
>> "while() {}" form. Would that strike people as weird?
>
> If they use a while {} as part of an expression then it should not.
> It's the same semantic as if () {} and it really is a the same thing.

I tend to agree. In fact, I'm considering resolving the "do-while is
not an expression" problem by changing the form to:

  do { ... } while (test-expr) [ else else-expr ]

shap
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to