[OT] Spaces/tabs (Was: simple display (from: GUI library for D))

"Jérôme M. Berger" jeberger at free.fr
Tue Apr 12 10:44:38 PDT 2011


spir wrote:
> In addition to those main reasons, they have a few nice side-effects:
> 
> * No indent width issue (!),
	True

> * 1 tab <--> 1 indent level conceptually,
	True

> * deletion is 1 key press, even with stupid editors.
	False, not with some *really* stupid editors I have seen (!)

> 
> A drawback is one cannot directly have different indent levels, for
> instance to indent collection contents more, or less, than blocks of
> code. This can also be considered an advantage; and is simply solved by
> using... spaces ;-)
> 
> void f () {
>  -> while (true) {
>  ->  -> table = [
>  ->  -> .."aaa" : 1,
>  ->  -> .."bbb" : 2,
>  ->  -> .."ccc" : 3,
>  ->  -> ];
>  ->  -> auto a = this(table);
>  ->  -> if (! a) break;
>  -> }
> }
> 
> (yes, the example is stupid)
> 
	Unfortunately, most editors are completely unable to handle this
example properly: sure they will *display* it fine, but they will
not allow you to *enter* it right (especially if you need more
spaces for alignment than the tab size).

		Jerome
-- 
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110412/9e53f03d/attachment.pgp>


More information about the Digitalmars-d mailing list