Coding style [message #503170] |
Fri, 11 December 2009 04:22 |
|
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 |
|
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 |
|
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 |
Henrik Lindberg 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
>
|
|
|
Powered by
FUDForum. Page generated in 0.03550 seconds