From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <31D2A9A4-E6AD-4D66-AE2A-6168A3F09D9C@mac.com> From: Pietro Gagliardi To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-Reply-To: <7359f0490805011852k64a52a01k1efc1e6aba8b030c@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Thu, 1 May 2008 22:19:11 -0400 References: <3CB4093E-098C-4E6F-B843-7B65E4461D81@mac.com> <7359f0490805011852k64a52a01k1efc1e6aba8b030c@mail.gmail.com> Subject: Re: [9fans] A new language for Plan 9 Topicbox-Message-UUID: 9c6b4b62-ead3-11e9-9d60-3106f5b1d025 On May 1, 2008, at 9:52 PM, Rob Pike wrote: > Indentation by white space is a very bad idea in my experience. > Superficially attractive but ultimately very dangerous. I once spent a > couple of days tracking down a bug caused by a source-to-source code > tool that broke a major program because the code it was injecting into > had indented one more space, causing the injecting code to break the > control flow. It was nearly impossible to track down. > This scenario is why I decided to require hard tabs as indents. You can't use a space. But a space halts the indentation, so the problem is still there. The next version will just ignore spaces, and treat the first non-whitespace character as the beginning of a line. > I have lots of other examples of lesser disasters. As code grows, > white space indentation becomes ever more problematic. It's a > maintenance disaster. > > Put it this way: It's unwise to make program structure depend on > invisible characters. There's a language made entirely of said invisible characters, called Whitespace. It's esoteric, but it works. And Python, which has the same style, is a phenomenal success. Whether or not indentation works relies on the programmer.