Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster dev » Coding style
Coding style [message #503170] Fri, 11 December 2009 04:22 Go to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Hi,
Buckminster uses a coding style that differs from the one used by the majority of the projects at Eclipse.org. In
particular, we put the '{' on a new line, i.e.

int size()
{
return size;
}

instead of:

int size() {
return size;
}

For historical reasons (before syntax coloring made the distinction really easy), we also prefix our fields with m_ or
s_, i.e.

private int m_size;

rather than

private int size;

I think it might be time to abandon our own style.

What's your opinion?

Regards,
Thomas Hallgren
Re: Coding style [message #503211 is a reply to message #503170] Fri, 11 December 2009 12:10 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
+1
but unsure of what you are proposing we should do - change everything???

- henrik

On 12/11/09 10:12 AM, Thomas Hallgren wrote:
> Hi,
> Buckminster uses a coding style that differs from the one used by the
> majority of the projects at Eclipse.org. In particular, we put the '{'
> on a new line, i.e.
>
> int size()
> {
> return size;
> }
>
> instead of:
>
> int size() {
> return size;
> }
>
> For historical reasons (before syntax coloring made the distinction
> really easy), we also prefix our fields with m_ or s_, i.e.
>
> private int m_size;
>
> rather than
>
> private int size;
>
> I think it might be time to abandon our own style.
>
> What's your opinion?
>
> Regards,
> Thomas Hallgren
Re: Coding style [message #503213 is a reply to message #503211] Fri, 11 December 2009 12:17 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
On 2009-12-11 13:10, Henrik Lindberg wrote:
> +1
> but unsure of what you are proposing we should do - change everything???
>
Yes, we would change the "Buckminster Coding Style" and run a source clean-up on all code.

- thomas
Re: Coding style [message #503433 is a reply to message #503170] Mon, 14 December 2009 06:44 Go to previous messageGo to next message
Karel Brezina is currently offline Karel BrezinaFriend
Messages: 68
Registered: July 2009
Member
+1

The aggregator uses generated code, which doesn't follow the buckminster
coding style anyway (field prefixes).

Karel



Thomas Hallgren napsal(a):
> Hi,
> Buckminster uses a coding style that differs from the one used by the
> majority of the projects at Eclipse.org. In particular, we put the '{'
> on a new line, i.e.
>
> int size()
> {
> return size;
> }
>
> instead of:
>
> int size() {
> return size;
> }
>
> For historical reasons (before syntax coloring made the distinction
> really easy), we also prefix our fields with m_ or s_, i.e.
>
> private int m_size;
>
> rather than
>
> private int size;
>
> I think it might be time to abandon our own style.
>
> What's your opinion?
>
> Regards,
> Thomas Hallgren
Re: Coding style [message #503445 is a reply to message #503213] Mon, 14 December 2009 08:49 Go to previous messageGo to next message
Filip Hrbek is currently offline Filip HrbekFriend
Messages: 233
Registered: July 2009
Senior Member
+1

We have been talking about this for a few weeks in Pilsen. You were just faster in introducing this topic here :-)

I myself never liked the bucky coding style, so I will appreciate the change very much.

Once we change the coding style rules, we will have to (except the cleanup) refactor the field names manually. I don't think that they will change automatically.

Filip

Thomas Hallgren napsal(a):
> On 2009-12-11 13:10, Henrik Lindberg wrote:
>> +1
>> but unsure of what you are proposing we should do - change everything???
>>
> Yes, we would change the "Buckminster Coding Style" and run a source
> clean-up on all code.
>
> - thomas
Re: Coding style [message #512811 is a reply to message #503170] Sun, 07 February 2010 22:26 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
I just released the cocing style change to the SVN trunk which means that we now have a new revision of all java code.
It will be hard to make history comparisons that span over this revision. Such comparisons will likely need to be split
in two. Prior and after the coding style change.

- thomas


On 12/11/2009 10:12 AM, Thomas Hallgren wrote:
> Hi,
> Buckminster uses a coding style that differs from the one used by the
> majority of the projects at Eclipse.org. In particular, we put the '{'
> on a new line, i.e.
>
> int size()
> {
> return size;
> }
>
> instead of:
>
> int size() {
> return size;
> }
>
> For historical reasons (before syntax coloring made the distinction
> really easy), we also prefix our fields with m_ or s_, i.e.
>
> private int m_size;
>
> rather than
>
> private int size;
>
> I think it might be time to abandon our own style.
>
> What's your opinion?
>
> Regards,
> Thomas Hallgren
Re: Coding style [message #512814 is a reply to message #512811] Mon, 08 February 2010 00:06 Go to previous message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Finally !
(I have always hated the m_, and s_ prefixes...)

- henrik

On 2/7/10 11:26 PM, Thomas Hallgren wrote:
> I just released the cocing style change to the SVN trunk which means
> that we now have a new revision of all java code. It will be hard to
> make history comparisons that span over this revision. Such comparisons
> will likely need to be split in two. Prior and after the coding style
> change.
>
> - thomas
>
>
> On 12/11/2009 10:12 AM, Thomas Hallgren wrote:
>> Hi,
>> Buckminster uses a coding style that differs from the one used by the
>> majority of the projects at Eclipse.org. In particular, we put the '{'
>> on a new line, i.e.
>>
>> int size()
>> {
>> return size;
>> }
>>
>> instead of:
>>
>> int size() {
>> return size;
>> }
>>
>> For historical reasons (before syntax coloring made the distinction
>> really easy), we also prefix our fields with m_ or s_, i.e.
>>
>> private int m_size;
>>
>> rather than
>>
>> private int size;
>>
>> I think it might be time to abandon our own style.
>>
>> What's your opinion?
>>
>> Regards,
>> Thomas Hallgren
>
Previous Topic:[buckminster-dev] Project meta data is out of date for tools.buckminster
Next Topic:[buckminster-dev] Downloading source jars
Goto Forum:
  


Current Time: Fri Apr 19 18:12:51 GMT 2024

Powered by FUDForum. Page generated in 0.04505 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top