Good Haskell Style

Benjamin Franksen benjamin.franksen at bessy.de
Fri Aug 3 09:30:46 EDT 2007


Jon Fairbairn wrote:
> David Roundy <droundy at darcs.net> writes:
>> Trailing white space doesn't particularly hurt, except if you're using
>> version control, in which case any removal of white space is liable to
>> conflict with actual coding changes, so it's better to have a policy that
>> it shouldn't be included.
> 
> This is surely an issue with either the language definition
> or the version control system.  In general, we ought to aim
> for a state of affairs where every requirement we make is
> mechannically checked. In this particular case, I'd say that
> the version control system ought to be more syntactically
> aware when looking for differences¹, for example by removing
> all trailing space before doing comparisons (and making sure
> that anything extracted from the repo has none).
> 
>>  I've certainly never heard of a scenario in which
>> trailing white space is beneficial.
> 
> Neither have I, but since it's invisible, asking that it not
> be there without providing automatic mechanical assistance
> is to add a tedious burden.

sed -e 's/[ \t]+$//'

Cheers
Ben



More information about the Libraries mailing list