tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: wedges on vnd(4) patch



On Jun 21,  5:11pm, erh%nimenees.com@localhost (Eric Haszlakiewicz) wrote:
-- Subject: Re: wedges on vnd(4) patch

| On Mon, Jun 21, 2010 at 02:45:42PM +0000, Christos Zoulas wrote:
| > In article <20100621053340.GA1301%boogers.sf.ca.us@localhost>,
| > Jeff Rizzo  <riz%NetBSD.org@localhost> wrote:
| > >I had occasion to use wedges on a vnd(4), only to be reminded that they're
| > >not currently supported.  Anyone see a problem with this patch? I've
| > >given it light testing, and haven't come across any issues yet...
| > 
| > - declare the variables on top to avoid braces in case statements.
| 
| Is this really a bad thing?  I find it makes things more readable.
| (although I tend to line things up a bit differently in my code, keeping the
|  code in each case at the same indentation level)

Well, I find the different indentation styles typically use for the braces
clumsy and not following the standard. Or even when they do, they cause the
code to move too much to the right:

1. don't like the two }} at the same level
switch (c) {
case 'a': {
        stmt;
}
}

2. same
switch (c) {
case 'a':
{
        stmt;
}
}

3. don't like the non-standard by 4 indent.
switch (c) {
case 'a':
    {
        stmt;
    }
}

4. too much on the right.
switch (c) {
case 'a':
        {
                stmt;
        }
}

etc.

christos


Home | Main Index | Thread Index | Old Index