Jump to page: 1 2 3
Thread overview
[phobos] Column limits again
Apr 09, 2011
Simen Kjaeraas
Apr 10, 2011
Cliff Hudson
Apr 10, 2011
Jonathan M Davis
Apr 10, 2011
Cliff Hudson
Apr 10, 2011
Jacob Carlborg
Apr 10, 2011
David Simcha
Apr 10, 2011
Jonathan M Davis
Apr 09, 2011
David Simcha
Apr 10, 2011
spir
Apr 09, 2011
Jonathan M Davis
Apr 10, 2011
Brad Roberts
Apr 12, 2011
Sean Kelly
Apr 13, 2011
Don Clugston
Apr 10, 2011
Robert Jacques
Apr 10, 2011
spir
Apr 10, 2011
Jacob
Apr 12, 2011
Sean Kelly
April 09, 2011
I must bring this back into discussion because it seems the recent traffic in the matter left the impression that "anything goes".

We have a pull request (https://github.com/D-Programming-Language/phobos/pull/27) with at least one line that is 195 characters long and others of comparable lengths.

I think as far as presenting arguments the ship has sailed. Let's now agree on a maximum line length. What should that be? 80? (Yes please.) 100? 120? Give me your vote for a number, but please let's avoid reviewing telex rolls going forward.


Thanks,

Andrei
April 10, 2011
On Sun, 10 Apr 2011 01:02:30 +0200, Andrei Alexandrescu <andrei at erdani.com> wrote:

> I must bring this back into discussion because it seems the recent traffic in the matter left the impression that "anything goes".
>
> We have a pull request (https://github.com/D-Programming-Language/phobos/pull/27) with at least one line that is 195 characters long and others of comparable lengths.
>
> I think as far as presenting arguments the ship has sailed. Let's now agree on a maximum line length. What should that be? 80? (Yes please.) 100? 120? Give me your vote for a number, but please let's avoid reviewing telex rolls going forward.

The longest line is actually 408 characters long. Ouch.

I'm firmly in the 80-char camp. That said, I'm not a Phobos contributor, so perhaps I should keep my mouth shut (or my fists clenched, or whatever the equivalent is for typing).

-- 
Simen
April 09, 2011
I'm against putting any limit on this because, again, it's a bikeshed issue and having any official rule at all is IMHO just plain silly.  If I were to vote, though, I'd vote for a soft limit of 80 characters.  By "soft" I mean that if a line is a few characters over here and there it's fine, but you shouldn't make a habit of it and if you add a level of indentation to some code and now a few lines are a few characters over, you don't need to go crazy reformatting those lines.

On 4/9/2011 7:02 PM, Andrei Alexandrescu wrote:
> I must bring this back into discussion because it seems the recent traffic in the matter left the impression that "anything goes".
>
> We have a pull request (https://github.com/D-Programming-Language/phobos/pull/27) with at least one line that is 195 characters long and others of comparable lengths.
>
> I think as far as presenting arguments the ship has sailed. Let's now agree on a maximum line length. What should that be? 80? (Yes please.) 100? 120? Give me your vote for a number, but please let's avoid reviewing telex rolls going forward.
>
>
> Thanks,
>
> Andrei
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>

April 09, 2011
> I must bring this back into discussion because it seems the recent traffic in the matter left the impression that "anything goes".
> 
> We have a pull request (https://github.com/D-Programming-Language/phobos/pull/27) with at least one line that is 195 characters long and others of comparable lengths.
> 
> I think as far as presenting arguments the ship has sailed. Let's now agree on a maximum line length. What should that be? 80? (Yes please.) 100? 120? Give me your vote for a number, but please let's avoid reviewing telex rolls going forward.

120, but even 100 would be a _big_ improvement over 80 (_especially_ if it's a hard limit). 80 is just too small if you have much indenting.

- Jonathan M Davis
April 09, 2011
80 characters.  Not a phobos contributor, but I've been coding for 20 years in various languages.  Long lines are hard to read - almost invariable nasty compound expressions (which should be factored for readability) or extremely long identifier names (nothing wrong with this, but ids should be as long as necessary and no longer.  There is no benefit to putting so much stuff onto a single line.

If you don't like coding style rules, tough - welcome to the real world.
 Until we write an IDE that operates on ASTs and formats code on an
individual basis, we will continue to have to do these things.

P.S. As a general rule, maintain the formatting style of the file in which you are making edits (spacing, bracing, etc.)

- Cliff

On Sat, Apr 9, 2011 at 4:13 PM, Simen Kjaeraas <simen.kjaras at gmail.com>wrote:

> On Sun, 10 Apr 2011 01:02:30 +0200, Andrei Alexandrescu <andrei at erdani.com> wrote:
>
>  I must bring this back into discussion because it seems the recent traffic
>> in the matter left the impression that "anything goes".
>>
>> We have a pull request ( https://github.com/D-Programming-Language/phobos/pull/27) with at least one line that is 195 characters long and others of comparable lengths.
>>
>> I think as far as presenting arguments the ship has sailed. Let's now agree on a maximum line length. What should that be? 80? (Yes please.) 100? 120? Give me your vote for a number, but please let's avoid reviewing telex rolls going forward.
>>
>
> The longest line is actually 408 characters long. Ouch.
>
> I'm firmly in the 80-char camp. That said, I'm not a Phobos contributor, so perhaps I should keep my mouth shut (or my fists clenched, or whatever the equivalent is for typing).
>
> --
> Simen
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20110409/309fea3b/attachment.html>
April 09, 2011
I don't contribute to phobos much, but regardless, hard 80 is too few, though soft 80 with a hard limit near 100 would match my habits quite well.

On 4/9/2011 4:02 PM, Andrei Alexandrescu wrote:
> I must bring this back into discussion because it seems the recent traffic in the matter left the impression that "anything goes".
> 
> We have a pull request (https://github.com/D-Programming-Language/phobos/pull/27) with at least one line that is 195 characters long and others of comparable lengths.
> 
> I think as far as presenting arguments the ship has sailed. Let's now agree on a maximum line length. What should that
> be? 80? (Yes please.) 100? 120? Give me your vote for a number, but please let's avoid reviewing telex rolls going forward.
> 
> 
> Thanks,
> 
> Andrei
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos

April 10, 2011
On Sat, 09 Apr 2011 19:02:30 -0400, Andrei Alexandrescu <andrei at erdani.com> wrote:

> I must bring this back into discussion because it seems the recent traffic in the matter left the impression that "anything goes".
>
> We have a pull request (https://github.com/D-Programming-Language/phobos/pull/27) with at least one line that is 195 characters long and others of comparable lengths.
>
> I think as far as presenting arguments the ship has sailed. Let's now agree on a maximum line length. What should that be? 80? (Yes please.) 100? 120? Give me your vote for a number, but please let's avoid reviewing telex rolls going forward.

I've recently found a certain elegance in the 80 character line (particularly with regard to posting code to bugzilla). That said, I've got code in my std.variant update that's currently sitting at an indent of 52 characters (13 4 character 'tabs'), which makes a 80 lines limit look silly. (Then again: struct,function,switch,static if,foreach,static if,static if,case,foreach,static if,static if,if,static if; isn't common. Also, Once I refactor the code, this indent is going to go up by another static if block)

My take would be a soft limit at 80 and a hard limit at min(80+indent, some_upper_limit). Also, we should consider if short, inline comments and assert/enforce error messages should have a different soft limit than regular code. (i.e. recommend code in lines 1-80 with brief comments in 80-100/120.)
April 10, 2011
I vote 120.

On 10 apr 2011, at 01:02, Andrei Alexandrescu <andrei at erdani.com> wrote:

> I must bring this back into discussion because it seems the recent traffic in the matter left the impression that "anything goes".
> 
> We have a pull request (https://github.com/D-Programming-Language/phobos/pull/27) with at least one line that is 195 characters long and others of comparable lengths.
> 
> I think as far as presenting arguments the ship has sailed. Let's now agree on a maximum line length. What should that be? 80? (Yes please.) 100? 120? Give me your vote for a number, but please let's avoid reviewing telex rolls going forward.
> 
> 
> Thanks,
> 
> Andrei
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
April 10, 2011
80

Sent from my iPhone

On Apr 9, 2011, at 7:02 PM, Andrei Alexandrescu <andrei at erdani.com> wrote:

> I must bring this back into discussion because it seems the recent traffic in the matter left the impression that "anything goes".
> 
> We have a pull request (https://github.com/D-Programming-Language/phobos/pull/27) with at least one line that is 195 characters long and others of comparable lengths.
> 
> I think as far as presenting arguments the ship has sailed. Let's now agree on a maximum line length. What should that be? 80? (Yes please.) 100? 120? Give me your vote for a number, but please let's avoid reviewing telex rolls going forward.
> 
> 
> Thanks,
> 
> Andrei
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
April 10, 2011
On 04/10/2011 01:23 AM, David Simcha wrote:
> I'm against putting any limit on this because, again, it's a bikeshed issue and having any official rule at all is IMHO just plain silly.  If I were to vote, though, I'd vote for a soft limit of 80 characters.  By "soft" I mean that if a line is a few characters over here and there it's fine, but you shouldn't make a habit of it and if you add a level of indentation to some code and now a few lines are a few characters over, you don't need to go crazy reformatting those lines.

Looks nice. I'd vote for a 'soft' 80 limit according to David's mind. Matches my practice, anyway.

Denis
-- 
_________________
vita es estrany
spir.wikidot.com

« First   ‹ Prev
1 2 3