Is 78 characters still a good option? Was: [Haskell-cafe]
breaking too long lines
miguelimo38 at yandex.ru
Sat Apr 25 10:44:45 EDT 2009
On 25 Apr 2009, at 18:34, Xiao-Yong Jin wrote:
> Miguel Mitrofanov <miguelimo38 at yandex.ru> writes:
>> On 24 Apr 2009, at 16:37, Loup Vaillant wrote:
>>> 2009/4/23 Miguel Mitrofanov <miguelimo38 at yandex.ru>:
>>>> On 23 Apr 2009, at 12:17, Thomas Davie wrote:
>>>>> Haskell is a very horizontal language, and to limit our horizontal
>>>>> seems pretty weird.
>>>> +1. I sometimes use lines up to 200 characters long, when I feel
>>>> they would
>>>> be more readable.
>>> 200 sounds awfully long. Do you have any example?
>> Something like
>> newtype MyCoolMonad = MyCoolMonad (FirstTransformer
>> (ThirdTransformer Whatever))) deriving (Functor, Monad, FirstClass,
>> SecondClass, ThirdClass, SomeOtherClass)
>> Nobody would be really interested in "deriving" clause, because it
>> basically says "derive everything possible". Therefore, it seems
>> pointless to move it to another line.
> You don't write lisp, do you? Or probably it is just me.
> But I would prefer to write the line as
> newtype MyCoolMonad = MyCoolMonad (FirstTransformer
> (ThirdTransformer Whatever)))
Well, first impression I've got from this was that FirstTransformer,
SecondTransformer and the rest are on the same level:
newtype MyCool Monad = MyCoolMonad (FirstTransformer)
(SecondTransformer) (ThirdTransformer Whatever)
which is very confusing.
> deriving (Functor, Monad,
> FirstClass, SecondClass, ThirdClass, SomeOtherClass)
A lot of unnecessary information distracting the reader. It's better
kept somewhere else, where it doesn't attract too much attention -
like in the end of the line.
More information about the Haskell-Cafe