Jump to page: 1 24  
Page
Thread overview
switch voting
Dec 09, 2003
Ant
Dec 09, 2003
Matthew Wilson
Dec 10, 2003
Ant
Dec 11, 2003
Lars Ivar Igesund
OT: Re: switch voting
Dec 11, 2003
Ilya Minkov
Dec 11, 2003
Berin Loritsch
Dec 11, 2003
Lars Ivar Igesund
Dec 12, 2003
Ilya Minkov
Dec 12, 2003
Berin Loritsch
Dec 12, 2003
Ilya Minkov
Dec 09, 2003
J C Calvarese
Dec 09, 2003
Hauke Duden
Dec 10, 2003
Dan Liebgold
Dec 10, 2003
Patrick Down
Dec 10, 2003
Sean L. Palmer
Dec 10, 2003
Charles Sanders
Dec 10, 2003
Georg Wrede
Dec 10, 2003
Andy Friesen
Dec 10, 2003
Ilya Minkov
Dec 10, 2003
Matthew Wilson
Dec 10, 2003
Patrick Down
Dec 10, 2003
Matthew Wilson
Dec 11, 2003
Patrick Down
Dec 11, 2003
Charles Sanders
Dec 11, 2003
Matthew Wilson
Dec 11, 2003
J C Calvarese
Dec 11, 2003
Antti Sykäri
Dec 11, 2003
Antti Sykäri
Dec 11, 2003
Ant
Dec 11, 2003
Ant
Dec 11, 2003
Benji Smith
Dec 11, 2003
J Anderson
December 09, 2003
<joke>
(better viewed with monospaced font)
I now declare the end of the argumentation :)
the jury will now vote:

M - must
D - desirable
W - who cares
N - NO

| remove   |
| runtime  | Implicit
| throw on | break and|
| missing  | multiple | Mandatory |
| default  | values   | default   |
+----------+----------+-----------+
| M - 2    | M - 0    | M - 0     | Total
| D - 0    | D - 1    | D - 0     |
| W - 0    | W - 0    | W - 1     |
| N - 1    | N - 0    | N - 0     |
+----------+----------+-----------+
|    M     |    D     |     W     | Ant
+----------+----------+-----------+
|    M     |          |           | MW
+----------+----------+-----------+
|    N     |          |           | WB
+----------+----------+-----------+

by multiple values I mean "case 1,3,43,19..23:"
seems to me that you shouldn't have implicit break
without multiple values.

I took the liberty to create two extra example voters
with ficticious initials (any relations to
D users is purelly coincitdental ;)
</joke>

(I guess what I really mean is that every body is saying the
same thing over and over again)

Ant


December 09, 2003
|    M     |    M     |     M     | MW

(Actually all this does not apply to me, because I *always* write the default. I do this reliably since I always write it immediately after I've written switch. Interestingly, having an explicit, but empty, default causes most C++ compilers to generate less efficient code, so in some "cases" it is better to not have a default in there. But if you want to hear more about that you'll have to buy the book! <g> )

"Ant" <Ant_member@pathlink.com> wrote in message news:br5h0m$u59$1@digitaldaemon.com...
> <joke>
> (better viewed with monospaced font)
> I now declare the end of the argumentation :)
> the jury will now vote:
>
> M - must
> D - desirable
> W - who cares
> N - NO
>
> | remove   |
> | runtime  | Implicit
> | throw on | break and|
> | missing  | multiple | Mandatory |
> | default  | values   | default   |
> +----------+----------+-----------+
> | M - 2    | M - 0    | M - 0     | Total
> | D - 0    | D - 1    | D - 0     |
> | W - 0    | W - 0    | W - 1     |
> | N - 1    | N - 0    | N - 0     |
> +----------+----------+-----------+
> |    M     |    D     |     W     | Ant
> +----------+----------+-----------+
> |    M     |          |           | MW
> +----------+----------+-----------+
> |    N     |          |           | WB
> +----------+----------+-----------+
>
> by multiple values I mean "case 1,3,43,19..23:"
> seems to me that you shouldn't have implicit break
> without multiple values.
>
> I took the liberty to create two extra example voters
> with ficticious initials (any relations to
> D users is purelly coincitdental ;)
> </joke>
>
> (I guess what I really mean is that every body is saying the
> same thing over and over again)
>
> Ant
>
>


December 09, 2003
I wanna vote, too!

|    M     |    M     |     N     | JCC

Let's make it easy to program in D.  If the programmer knows he needs to  handle every case he can use "default: assert(0);" or whatever solution he prefers.  We're all grown-ups here, right?


Justin

Ant wrote:
> <joke>
> (better viewed with monospaced font)
> I now declare the end of the argumentation :)
> the jury will now vote:
> 
> M - must
> D - desirable
> W - who cares
> N - NO
> 
> | remove   |
> | runtime  | Implicit
> | throw on | break and|
> | missing  | multiple | Mandatory |
> | default  | values   | default   |
> +----------+----------+-----------+
> | M - 2    | M - 0    | M - 0     | Total
> | D - 0    | D - 1    | D - 0     |
> | W - 0    | W - 0    | W - 1     |
> | N - 1    | N - 0    | N - 0     |
> +----------+----------+-----------+
> |    M     |    D     |     W     | Ant
> +----------+----------+-----------+
> |    M     |          |           | MW
> +----------+----------+-----------+
> |    N     |          |           | WB
> +----------+----------+-----------+
> 
> by multiple values I mean "case 1,3,43,19..23:"
> seems to me that you shouldn't have implicit break
> without multiple values.
> 
> I took the liberty to create two extra example voters
> with ficticious initials (any relations to
> D users is purelly coincitdental ;)
> </joke>
> 
> (I guess what I really mean is that every body is saying the
> same thing over and over again)
> 
> Ant
December 09, 2003
Ok, it was a joke, but what the hell...

For the record:

| remove   |
| runtime  | Implicit
| throw on | break and|
| missing  | multiple | Mandatory |
| default  | values   | default   |
+----------+----------+-----------+
|    M     |    D     |     M     | HD
+----------+----------+-----------+



Hauke
December 10, 2003
Oh, ok.

| remove   |
| runtime  | Implicit
| throw on | break and|
| missing  | multiple | Mandatory |
| default  | values   | default   |
+----------+----------+-----------+
|    W     |    M     |     N     | DL
+----------+----------+-----------+


December 10, 2003

| remove   |
| runtime  | Implicit
| throw on | break and|
| missing  | multiple | Mandatory |
| default  | values   | default   |
+----------+----------+-----------+
|    N     |    D     |     N     | PD
+----------+----------+-----------+
December 10, 2003
| remove   |
| runtime  | Implicit
| throw on | break and|
| missing  | multiple | Mandatory |
| default  | values   | default   |
+----------+----------+-----------+
|    M     |   D     |     M     | CS
+----------+----------+-----------+
"Ant" <Ant_member@pathlink.com> wrote in message
news:br5h0m$u59$1@digitaldaemon.com...
> <joke>
> (better viewed with monospaced font)
> I now declare the end of the argumentation :)
> the jury will now vote:
>
> M - must
> D - desirable
> W - who cares
> N - NO
>
> | remove   |
> | runtime  | Implicit
> | throw on | break and|
> | missing  | multiple | Mandatory |
> | default  | values   | default   |
> +----------+----------+-----------+
> | M - 2    | M - 0    | M - 0     | Total
> | D - 0    | D - 1    | D - 0     |
> | W - 0    | W - 0    | W - 1     |
> | N - 1    | N - 0    | N - 0     |
> +----------+----------+-----------+
> |    M     |    D     |     W     | Ant
> +----------+----------+-----------+
> |    M     |          |           | MW
> +----------+----------+-----------+
> |    N     |          |           | WB
> +----------+----------+-----------+
>
> by multiple values I mean "case 1,3,43,19..23:"
> seems to me that you shouldn't have implicit break
> without multiple values.
>
> I took the liberty to create two extra example voters
> with ficticious initials (any relations to
> D users is purelly coincitdental ;)
> </joke>
>
> (I guess what I really mean is that every body is saying the
> same thing over and over again)
>
> Ant
>
>


December 10, 2003
| remove   |
| runtime  | Implicit
| throw on | break and|
| missing  | multiple | Mandatory |
| default  | values   | default   |
+----------+----------+-----------+
|    D     |    M     |     D     | GW
+----------+----------+-----------+

Mandatory default of course makes the runtime
throw obsolete.

"Ant" <Ant_member@pathlink.com> wrote in message news:br5h0m$u59$1@digitaldaemon.com...
> <joke>


December 10, 2003
Ant wrote:

> <joke>
> [...]
> </joke>
> 
> (I guess what I really mean is that every body is saying the
> same thing over and over again)
> 
> Ant

The only place I've ever even used switch/case in D is either WndProc, or some similar message enumeration. (SDL, enet, etc)  The "throw on no default" thing has caught me exactly once, and it was an easy fix.

I am stunned beyond description that this issue has raised so much discussion.  What's the big deal? O_o

 -- andy
December 10, 2003
Andy Friesen wrote:

> The only place I've ever even used switch/case in D is either WndProc, or some similar message enumeration. (SDL, enet, etc)  The "throw on no default" thing has caught me exactly once, and it was an easy fix.

Yup. It's good for what it's worth.

> I am stunned beyond description that this issue has raised so much discussion.  What's the big deal? O_o

Isn't it always like that with flamewars...

I think that Mathew started it, but he wouldn't if i didn't mention it earlier on. :(

BTW, we must flame Mathew not to use "alias int boolean" in his libraries. ;)

-eye

« First   ‹ Prev
1 2 3 4