Send Moses-support mailing list submissions to
moses-support@mit.edu
To subscribe or unsubscribe via the World Wide Web, visit
http://mailman.mit.edu/mailman/listinfo/moses-support
or, via email, send a message with subject or body 'help' to
moses-support-request@mit.edu
You can reach the person managing the list at
moses-support-owner@mit.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Moses-support digest..."
Today's Topics:
1. Re: New source formatter & checker (Ulrich Germann)
----------------------------------------------------------------------
Message: 1
Date: Wed, 27 May 2015 17:27:19 +0100
From: Ulrich Germann <ulrich.germann@gmail.com>
Subject: Re: [Moses-support] New source formatter & checker
To: Hieu Hoang <hieuhoang@gmail.com>
Cc: "moses-support@mit.edu" <moses-support@mit.edu>
Message-ID:
<CAHQSRUoOBE9Y_bnQG054PkRwJGYAf53SAOe5EMXJEAO1eb6j9Q@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hi all,
a few things before you vote. I personally find the Gnu style the most
readable,
but the page linked to on the poll misrepresents the gnu style. (It claims
that braces
are indented 4 positions, and then the code block is indented another 4
positions.)
As far as beautification is concerned, I think it should either be run
before
EVERY commit (via a git pre-commit hook), or never automatically on all
files.
There are several reasons, the most relevant to me is that it makes it hard
to track
real changes in the code if someone runs beautify on the entire code base
every
once in a while.
Finally, let me just repeat my arguments for having opening braces on a new
line
vertically aligned with the closing bracket.
1. It's much easier to recognize logical code blocks. It is. Try it out.
Read code that you
haven't written and be honest with yourself. It may seem unfamiliar at
first, but once
you are used to it, there's no turning back.
2. If you want to temporarily disable a condition (e.g. in debugging), you
just comment
out the if statement. You do not have to THEN put an opening brace at
the beginning
of the line (extra editing) and remove it later (extra editing again)
--- which also
FORCES you to be inconsistent. (You can't always remove the braces
because
of variable scoping). You have the same issue when you want to use
preprocessor
commands to have conditions only under certain circumstances, so instead
of
#ifdef ENABLE_CONDITION
if (condition)
Subscribe to:
Post Comments (Atom)
0 Response to "Moses-support Digest, Vol 103, Issue 70"
Post a Comment