lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 1/24/06, Enrico Colombini <erix@erix.it> wrote:
> Unfortunately, 'indentation' is not well defined. You may encounter a source
> file (or section of file, or just a single line) using only tabs, another
> using only spaces, another yet using an impredictable mixture of both (some
> editors do the latter automatically).
> ......

Then again, the root of the evil is tabbing and not indenting per se.
I do use indentation, be it part of the syntax or not, but _never_
use tabbing for reasons you point out and for others as well.

As for the other problems that you mention, such as copying/pasting
and programmatic code generation, I think that, _when_ indentation does
create a difficulty (I agree it _can_, depending on the circumstances),
then most probably there will be other difficulties as well, except
indentation.

Lisa Parratt <lisa@thecommune.org.uk> wrote:
> Yes, but the amount of white space that a tab means changes depending on
> the editor. One unlucky save, and all those tab characters get converted
> into 20 spaces, and the scoping of your program is essentially randomised.

As I said above, and also in my previous post (in the only part that you cut
out) it is not indentation that causes problems, only tabbing does.  I can
recall several languages (occam, Miranda, Haskell, Python) that use ``the
offset rule''.  None talks of tab characters in order to define offsets, only
plain spaces are considered or implied.  So the issue you see is not with
indentation -- it is with text editors or with how we use them.  Similarly, if
a text editor is limited in the maximal length of a line that it can handle,
does it mean that a language which permits programs with long lines is
poorly designed?

Cheers,
  Boyko