Switch-case made less buggy, now with PATCH!

Leandro Lucarella llucax at gmail.com
Mon Nov 23 15:49:20 PST 2009


Andrei Alexandrescu, el 23 de noviembre a las 11:43 me escribiste:
> >Again, and in case it's hard to understand, I'm not saying the any patch
> >should be accepted. Even more, I don't think Chad's patched should be
> >accepted, I also think introducing case !: is a bad idea. I'm just saying
> >that the patch was mostly turned down because he didn't asked for other
> >devs permission to make the patch, not because of the quality of the patch
> >(or the feature) itself. That discourages people to make patches, and
> >I think that's *really* bad.
> >
> >Again, that was only my perception, maybe this was not the intention of
> >the people who wrote the messages.
> 
> I understand and agree. One issue we're facing right now is that the
> publication of the D source is relatively recent and the number of
> contributors is relatively low. In this context, if we required
> anyone who ever wants to propose a feature to also provide a patch
> we'd pretty much kill the traffic on this group. I look forward to
> the day when that request will become reasonable.

I totally agree. What I'm saying is that providing patches with features
request should be *encouraged*, not *required* (and certainly not
discouraged! :).

> The positive side remains: Chad now knows enough about the
> implementation to accommodate any change to the design.

Sure, he might be able to change his patch in a way that has consensus.

> At any rate, after having discussed this more with Walter, it looks
> like the switch semantics is here to stay. He claims to use fall
> through fairly often (in spite of the mounting evidence to the
> contrary) and finds the notion that you need to wrote "goto case x;"
> just before "case x:" completely stupid. I disagree but I also want
> to carefully pick my fights so I'll leave this matter to others.

Well, you only have to write "goto case;", no need for the label if you
only want fall-through.

It's really sad that Walter dismissed this issue, even when nobody else
defended the implicit fall-through and even he was proved wrong about his
own frequency of use.


Come on, Walter! =)

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
Si por el chancho fuera, se autocomería con chimichurri Worshestershire!



More information about the Digitalmars-d mailing list