unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Code Style Bikeshed 1/n: Break before Brace or Brace before Break? 
@ 2011-12-18 12:04 David Bremner
  2011-12-18 15:50 ` Dmitry Kurochkin
  0 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2011-12-18 12:04 UTC (permalink / raw)
  To: Notmuch Mail


In id:"1324135695-15487-1-git-send-email-david@tethera.net" we started
discussing the use of uncrustify (or some equivalent tool) to enforce
code style. In order for this to work, we would need to be a bit more
rigid about style.

So my sunday morning bikeshed-bait is do we want 

if (...) {
}

or 

if (...) 
{
}

(and similarly for 'switch', 'for', 'while')

If I look at a small sample of Carl's original code it seems like the
former is more typical. But I might be biased because that is what I
prefer.

d

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Code Style Bikeshed 1/n: Break before Brace or Brace before Break?
  2011-12-18 12:04 Code Style Bikeshed 1/n: Break before Brace or Brace before Break? David Bremner
@ 2011-12-18 15:50 ` Dmitry Kurochkin
  2011-12-18 16:12   ` Tomi Ollila
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Kurochkin @ 2011-12-18 15:50 UTC (permalink / raw)
  To: David Bremner, Notmuch Mail

+1 for the former.

How about indenting with spaces+tabs vs indenting with spaces only? :)

Regards,
  Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Code Style Bikeshed 1/n: Break before Brace or Brace before Break?
  2011-12-18 15:50 ` Dmitry Kurochkin
@ 2011-12-18 16:12   ` Tomi Ollila
  2011-12-18 16:18     ` Dmitry Kurochkin
  2011-12-18 17:13     ` Austin Clements
  0 siblings, 2 replies; 6+ messages in thread
From: Tomi Ollila @ 2011-12-18 16:12 UTC (permalink / raw)
  To: Dmitry Kurochkin, David Bremner, Notmuch Mail

On Sun, 18 Dec 2011 19:50:52 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> +1 for the former.

+1

> How about indenting with spaces+tabs vs indenting with spaces only? :)

-1 --	tab-width is 8, anything else is heretic. Everyone enable 
	git pre-commit hook :)

> Regards,
>   Dmitry

Tomi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Code Style Bikeshed 1/n: Break before Brace or Brace before Break?
  2011-12-18 16:12   ` Tomi Ollila
@ 2011-12-18 16:18     ` Dmitry Kurochkin
  2012-01-12 17:18       ` Pieter Praet
  2011-12-18 17:13     ` Austin Clements
  1 sibling, 1 reply; 6+ messages in thread
From: Dmitry Kurochkin @ 2011-12-18 16:18 UTC (permalink / raw)
  To: Tomi Ollila, David Bremner, Notmuch Mail

On Sun, 18 Dec 2011 18:12:51 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> On Sun, 18 Dec 2011 19:50:52 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> > +1 for the former.
> 
> +1
> 
> > How about indenting with spaces+tabs vs indenting with spaces only? :)
> 
> -1 --	tab-width is 8, anything else is heretic. Everyone enable 
> 	git pre-commit hook :)
> 

Sorry, -1 for what? :)

FWIW tabs make patch review a pain in our favourite interface to our
favourite mail system because of message indenting.

Regards,
  Dmitry

> > Regards,
> >   Dmitry
> 
> Tomi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Code Style Bikeshed 1/n: Break before Brace or Brace before Break?
  2011-12-18 16:12   ` Tomi Ollila
  2011-12-18 16:18     ` Dmitry Kurochkin
@ 2011-12-18 17:13     ` Austin Clements
  1 sibling, 0 replies; 6+ messages in thread
From: Austin Clements @ 2011-12-18 17:13 UTC (permalink / raw)
  To: David Bremner; +Cc: Tomi Ollila, Notmuch Mail

Quoth Tomi Ollila on Dec 18 at  6:12 pm:
> On Sun, 18 Dec 2011 19:50:52 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> > +1 for the former.
> 
> +1

+1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Code Style Bikeshed 1/n: Break before Brace or Brace before Break?
  2011-12-18 16:18     ` Dmitry Kurochkin
@ 2012-01-12 17:18       ` Pieter Praet
  0 siblings, 0 replies; 6+ messages in thread
From: Pieter Praet @ 2012-01-12 17:18 UTC (permalink / raw)
  To: Dmitry Kurochkin, Tomi Ollila, David Bremner, Notmuch Mail

On Sun, 18 Dec 2011 20:18:03 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> On Sun, 18 Dec 2011 18:12:51 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> > On Sun, 18 Dec 2011 19:50:52 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> > > +1 for the former.
> > 
> > +1
> > 
> > > How about indenting with spaces+tabs vs indenting with spaces only? :)
> > 
> > -1 --	tab-width is 8, anything else is heretic. Everyone enable 
> > 	git pre-commit hook :)
> > 
> 
> Sorry, -1 for what? :)
> 
> FWIW tabs make patch review a pain in our favourite interface to our
> favourite mail system because of message indenting.
> 

~+1...

Neither the tabs nor the spaces impede patch review from within Notmuch.

The real cause of this confusing indentation is that we're using *both*,
which -from my point of view- makes absolutely no sense.

Personally, I'd like to see

  ;; -*- tab-width: 2; indent-tabs-mode: nil; -*-

... but frankly, I don't care whether it's tabs or spaces, or whether
it's mod-2, mod-4 or mod-8... as long as it's *tabs XOR spaces*.


And brace-before-break, of course... :)


So, when's this bikeshed due to be delivered ?
Also, if I order *now*, do I get a complementary cheese grater ?

> Regards,
>   Dmitry
> 
> > > Regards,
> > >   Dmitry
> > 
> > Tomi


Peace

-- 
Pieter

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-12 17:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-18 12:04 Code Style Bikeshed 1/n: Break before Brace or Brace before Break? David Bremner
2011-12-18 15:50 ` Dmitry Kurochkin
2011-12-18 16:12   ` Tomi Ollila
2011-12-18 16:18     ` Dmitry Kurochkin
2012-01-12 17:18       ` Pieter Praet
2011-12-18 17:13     ` Austin Clements

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).