in reply to Change default style sheet: add line numbers

add line numbers to code listings

This certainly sounds like a nice option, but i wonder how much it would actually help. First we need an errors message that refers to line numbers, and then we'll need to make sure it was posted as written. Saying this would encourage people to then post those error messages does indeed sound enticing, though perhaps too optimistic.

Personally, i think the option would be a nice aesthetic addition. Though, whether the option is based on the poster on the reader is debatable. Personally, i vote for the latter.

A ridiculous side note: Wouldn't that limit code length? I mean, "your lines are numbered <evil laugh>" :)

  • Comment on Re: Change default style sheet: add line numbers

Replies are listed 'Best First'.
Re^2: Change default style sheet: add line numbers
by LanX (Saint) on Mar 31, 2015 at 16:02 UTC
    I agree that the effect on new posters is not really predictable. (IMHO there are other possible measures that may have far more impact)

    But for someone trying to read and answer on longer code, line numbers could be very helpful.

    > we'll need to make sure it was posted as written

    well this could be fixed with an optional start-offset.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)

    PS: Je suis Charlie!

      >But for someone trying to read and answer on longer code, line numbers could be very helpful.

      Agreed. Though this begs the question: How often do you think this comes up? That is, that a code listing was "long enough" that you had wished there were provided line numbers?

        > That is, that a code listing was "long enough" that you had wished there were provided line numbers?

        well whenever I have to refrain to inlined comments to mark lines

        print (1+2)+3; # <- here is your problem

        i.o.w. too often ;-P

        Of course this could be up to your personal setting or a JS based nodelet hack, but if you are not sure that the other ones can easily see line numbers you won't use them.

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)

        PS: Je suis Charlie!