On 5/13/2013 8:34 PM, Jim Gibson wrote:
> In article <51917188$0$32104$
1472...@news.sunsite.dk>, Arne Vajh�j
> <
ar...@vajhoej.dk> wrote:
>
>> On 5/13/2013 2:02 PM, Gene Wirchenko wrote:
>>> On Sun, 12 May 2013 22:07:42 -0400, Arne Vajh�j <
ar...@vajhoej.dk>
>>> wrote:
>>>
>>> [snip]
>>>
>>>> Each language has its own standards, conventions and practices. I am
>>>> very skeptical about an attempt to format different languages identical.
>>>
>>> Not identical, but I have found that I can use very similar
>>> standards across multiple languages.
>>
>> I am sure that you *can*.
>>
>> But you will end up with N-1 or N languages being
>> formatted "unusual".
>
> To my limited knowledge Java is the only language whose originating
> vendor publishes an "official" formatting standard. Usually, it is
> individuals, groups, or organizations that develop formatting standards
> and attempt to enforce them for some body of work.
>
> Authors will use a consistent formatting style, and these can become
> defacto standards (e.g., Kernighan and Ritchie, Stroustrup).
It varies.
MS has published some conventions for C#. Guido has published some
guide for python.
But C and C++ has multiple widely used standards. I have seen many
different (but somewhat compatible) conventions for Ruby and PHP.
> I, too, try to be consistent in formatting style when moving between
> languages whenever possible, because it makes me more productive.
That is fine if you are the only person ever to work on the code.
But if somebody else is, then they will be more productive if
it is more "standard".
> I have worked on projects with practically no standards, and others
> with extensive standards, but they never seemed to be enforced.
There are tools to enforce if there is a will to enforce.
> Usually, the customer just wants the project finished, and never mind
> about the format of the code.
That has been seen.
:-)
But after 20 years with high annual maintenance cost it also happens
that they regret.
Arne