Re: Why is 'else' demanded?

Carfield Yim <[email protected]> Mon, 10 Jun 2013 23:34:09 +0800
Newsgroups gmane.comp.programming.refactoring
Message-ID <CACfbOveB_x1xfFXDPzZaAH8U2oxgZ24=7akpB8S1krF49EB_XQ@mail.gmail.com>
I think one reason is C have if-else and quite a number of languages base
on C.

On Mon, Jun 10, 2013 at 3:02 AM, =E5=BC=A0=E7=BA=A2=E4=BA=AE <zhanghonglian=
[email protected]> wrote:

> I have a problem. Why is there always else key word in a language? Since =
I
> can use return to stop the process of a flow. I hate to see else statemen=
t
> and I see I can never use else statement that only increase the complexit=
y
> of program.
>
> A if statement stands for a condition that should be unique, and it shoul=
d
> has no relation with anything else. So a language does not need else and =
it
> should not appear in a program.
>
> Sent from my iPad
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>


[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/refactoring/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/refactoring/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected]=20
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/