[web-devel] Fwd: [hamlet] Clearer error for mixed spaces / tabs nesting in cassius (#2)
michael at snoyman.com
Fri Jun 3 16:26:20 CEST 2011
So basically, we have two choices:
* Allow *only* tabs or *only* spaces.
* Disallow tabs entirely.
Out of curiosity, is any actually using tabs in Hamlet/Cassius? I'm
leaning towards the second option if only because it's incredibly
simple to implement.
 In case anyone's worried, this discussion is only relevant for the
first whitespace characters on the line, otherwise I don't see any
reason to care about tab versus spaces.
On Fri, Jun 3, 2011 at 3:56 PM, Greg Weber <greg at gregweber.info> wrote:
> I think the 1 tab = X spaces rule is bad: it implies a mixing of tabs and
> spaces, which only leads to problems.
> Ideally one could choose between using either 1 tab or the same multiple of
> spaces, but never mix the two.
> On Fri, Jun 3, 2011 at 5:37 AM, Aristid Breitkreuz <aristidb at googlemail.com>
>> Ban tabs.
>> Am 03.06.2011 13:58 schrieb "Michael Snoyman" <michael at snoyman.com>:
>> > I don't have a strong opinion on tabs/spaces for Hamlet and Cassius
>> > (the discussion isn't relevant for Julius or Lucius). So I thought I'd
>> > just throw this to the web-devel list: what do you guys think?
>> > Currently, 1 tab = 4 spaces for indentation purposes. I personally
>> > never use hard tabs for Haskell, so the question doesn't affect me.
>> > Michael
>> > ---------- Forwarded message ----------
>> > From: Shimuuar
>> > <reply+i-326148-baa0eff244395e870f290821538bf79d83ec1190 at reply.github.com>
>> > Date: Wed, Jun 1, 2011 at 7:33 PM
>> > Subject: Re: [hamlet] Clearer error for mixed spaces / tabs nesting in
>> > cassius (#2)
>> > To: michael at snoyman.com
>> > I'd vote to ban tabs. They may change meaning of program silently. If
>> > your editor and hamlet/cassius have different tab width it may lead
>> > either to error or it could be parsed not as you expected. Second case
>> > is real. I encountered it.
>> > IMHO mixing tabs and significant indentation is generally bad idea™
>> > --
>> > Reply to this email directly or view it on GitHub:
>> > https://github.com/snoyberg/hamlet/issues/2#comment_1275487
>> > _______________________________________________
>> > web-devel mailing list
>> > web-devel at haskell.org
>> > http://www.haskell.org/mailman/listinfo/web-devel
>> web-devel mailing list
>> web-devel at haskell.org
More information about the web-devel