You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by bxqdev <bx...@themailbay.com> on 2012/01/27 12:36:05 UTC
What's the point of the deviation of java code style in Cassandra?
Hello, Cassandra Developers!
What's the point of the deviation ("important exception") from the Sun's
Java coding convention in Cassandra's java code Style:
"{ and } are always placed on a new line"
Why is that??
thanks.
Re: What's the point of the deviation of java code style in Cassandra?
Posted by bxqdev <bx...@themailbay.com>.
yeah, i guess that's the main reason. another one is that root developers probably have c++ background. curly braces on the new
line, short and ugly classnames - are the signs of c++ developer in java universe. and since cassandra uses thrift, which is c++
related, it's not a surprise. but i guess it's not that important, though i would explore cassandra's code with more joy, if it
was written in a proper code style :)
On 1/28/2012 12:11 AM, Eric Evans wrote:
> On Fri, Jan 27, 2012 at 5:36 AM, bxqdev<bx...@themailbay.com> wrote:
>> Hello, Cassandra Developers!
>>
>> What's the point of the deviation ("important exception") from the Sun's
>> Java coding convention in Cassandra's java code Style:
>>
>> "{ and } are always placed on a new line"
>>
>> Why is that??
>
> That is how it came from Facebook. Doing it differently afterward
> would just make things inconsistent (which is worse), and reformatting
> the entire codebase is disruptive on a number of fronts.
>
Re: What's the point of the deviation of java code style in Cassandra?
Posted by Eric Evans <ee...@acunu.com>.
On Fri, Jan 27, 2012 at 5:36 AM, bxqdev <bx...@themailbay.com> wrote:
> Hello, Cassandra Developers!
>
> What's the point of the deviation ("important exception") from the Sun's
> Java coding convention in Cassandra's java code Style:
>
> "{ and } are always placed on a new line"
>
> Why is that??
That is how it came from Facebook. Doing it differently afterward
would just make things inconsistent (which is worse), and reformatting
the entire codebase is disruptive on a number of fronts.
--
Eric Evans
Acunu | http://www.acunu.com | @acunu
Re: What's the point of the deviation of java code style in Cassandra?
Posted by bxqdev <bx...@themailbay.com>.
On 1/27/2012 10:49 PM, Tatu Saloranta wrote:
> On Fri, Jan 27, 2012 at 4:05 AM, Stephen Connolly
> <st...@gmail.com> wrote:
>> You perhaps are not a veteran of the braces wars of 1973-2011...
>>
>> Please don't try to start them up again!
>>
>> Every project has its own style. Stick to that style.
>
> +1
>
> known as the "When in Rome..." convention.
what's that?
>
> -+ Tatu +-
Re: What's the point of the deviation of java code style in Cassandra?
Posted by Tatu Saloranta <ts...@gmail.com>.
On Fri, Jan 27, 2012 at 4:05 AM, Stephen Connolly
<st...@gmail.com> wrote:
> You perhaps are not a veteran of the braces wars of 1973-2011...
>
> Please don't try to start them up again!
>
> Every project has its own style. Stick to that style.
+1
known as the "When in Rome..." convention.
-+ Tatu +-
Re: What's the point of the deviation of java code style in Cassandra?
Posted by Stephen Connolly <st...@gmail.com>.
You perhaps are not a veteran of the braces wars of 1973-2011...
Please don't try to start them up again!
Every project has its own style. Stick to that style.
There is no standard style, Sun's convention is just the style they tried
to enforce on their own codebase... I should point out that they didn't
enforce it there either.
Many a developer was left wounded on the battlefield in those braces
wars... let's hope more do not have to follow
On 27 January 2012 11:57, bxqdev <bx...@themailbay.com> wrote:
> i guess you mean it's not a constructive question.
> it would be, it there wasn't a standard: Sun's Java coding convention,
> which already says how to place curly braces correctly.
>
> why deviate from the de facto standard for no reason?
>
> thanks.
>
>
> On 1/27/2012 3:48 PM, Stephen Connolly wrote:
>
>> http://programmers.**stackexchange.com/questions/**
>> 2715/should-curly-braces-**appear-on-their-own-line<http://programmers.stackexchange.com/questions/2715/should-curly-braces-appear-on-their-own-line>
>>
>> On 27 January 2012 11:36, bxqdev<bx...@themailbay.com> wrote:
>>
>> Hello, Cassandra Developers!
>>>
>>> What's the point of the deviation ("important exception") from the Sun's
>>> Java coding convention in Cassandra's java code Style:
>>>
>>> "{ and } are always placed on a new line"
>>>
>>> Why is that??
>>>
>>> thanks.
>>>
>>>
>>
Re: What's the point of the deviation of java code style in Cassandra?
Posted by bxqdev <bx...@themailbay.com>.
i guess you mean it's not a constructive question.
it would be, it there wasn't a standard: Sun's Java coding convention,
which already says how to place curly braces correctly.
why deviate from the de facto standard for no reason?
thanks.
On 1/27/2012 3:48 PM, Stephen Connolly wrote:
> http://programmers.stackexchange.com/questions/2715/should-curly-braces-appear-on-their-own-line
>
> On 27 January 2012 11:36, bxqdev<bx...@themailbay.com> wrote:
>
>> Hello, Cassandra Developers!
>>
>> What's the point of the deviation ("important exception") from the Sun's
>> Java coding convention in Cassandra's java code Style:
>>
>> "{ and } are always placed on a new line"
>>
>> Why is that??
>>
>> thanks.
>>
>
Re: What's the point of the deviation of java code style in Cassandra?
Posted by Stephen Connolly <st...@gmail.com>.
http://programmers.stackexchange.com/questions/2715/should-curly-braces-appear-on-their-own-line
On 27 January 2012 11:36, bxqdev <bx...@themailbay.com> wrote:
> Hello, Cassandra Developers!
>
> What's the point of the deviation ("important exception") from the Sun's
> Java coding convention in Cassandra's java code Style:
>
> "{ and } are always placed on a new line"
>
> Why is that??
>
> thanks.
>