On Wed, Mar 1, 2017 at 12:23 PM, Fabien COELHO <coe...@cri.ensmp.fr> wrote:

>
> Hello Corey,
>
> on elif
>>  if misplaced elif
>>     misplaced elif error
>>  else
>>     eval expression
>>       => possible eval error
>>     set new status if eval fine
>>
>
> Currently it is really:
>
>   switch (state) {
>   case NONE:
>   case ELSE_TRUE:
>   case ELSE_FALSE:
>      success = false;
>      show some error
>   default:
>   }
>   if (success) {
>     success = evaluate_expression(...);
>     if (success) {
>        switch (state) {
>        case ...:
>        default:
>        }
>     }
>   }
>
> Which I do not find so neat. The previous one with nested switch-if-switch
> looked as bad.


That is accurate. The only positive it has is that the user only
experiences one error, and it's the first error that was encountered if
reading top-to-bottom, left to right. It is an issue of which we prioritize
- user experience or simpler code.

Now if you want to require committer opinion on this one, fine with me.


Rather than speculate on what a committer thinks of this edge case (and
making a patch for each possible theory), I'd rather just ask them what
their priorities are and which user experience they favor.

Reply via email to