Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-18 Thread Thomas -Balu- Walter
On Mon, Nov 17, 2003 at 08:07:35PM +, Jonathan Dowland wrote: > Torvalds' position is that code that cannot be expressed using > 8-spaces-per-indent and wrap at 79 characters needs to be rewritten. Who is Thorvalds? SCNR Balu /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-18 Thread Darren Salt
I demand that Steve Lamb may or may not have written... [snip] > if foo > bar > else > baz fi -- | Darren Salt | linux (or ds) at | nr. Ashington, | woody, sarge, | youmustbejoking | Northumberland | RISC OS | demon co uk | Toon Army | Let's keep the pound sterling

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-18 Thread Steve Lamb
Julian Mehnle wrote: I call that readable, but I guess somebody won't. ;-) Actually it is quite readable and sensible in that it breaks down the regex into parts that a human can read. Oh, and the equivolant would be legal in Python. Which was kind of my point on asking H.S. the two questio

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-18 Thread Chad Walstrom
On Mon, Nov 17, 2003 at 06:02:40PM -0800, Tom wrote: > If whitespace mistakes are always caught at compile-time, then I > probably wouldn't care about them either. So I'm not bashing python; > having never used it: I'm bashing languages where syntatic mistakes > are not caught at compile-time. I

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-18 Thread Cameron Patrick
On Tue, Nov 18, 2003 at 11:55:01AM +0100, Julian Mehnle wrote: | Steve Lamb wrote: | > 2: Can you provide an example of such free-style coding that you speak | > so highly of? | | # Split header into separate header lines, dropping any unneeded or | # spurious header lines: | @header_lines = grep(

RE: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-18 Thread Julian Mehnle
Steve Lamb wrote: > 2: Can you provide an example of such free-style coding that you speak > so highly of? # Split header into separate header lines, dropping any unneeded or # spurious header lines: @header_lines = grep( ( /^(?: # Wanted headers: X-Spam-Status

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-18 Thread Wouter Verhelst
On Mon, Nov 17, 2003 at 11:08:44PM -0600, Gunnar Wolf wrote: > H. S. Teoh dijo [Mon, Nov 17, 2003 at 08:47:27PM -0500]: > > > >*chalks up one more reason to avoid Python like the plague...* > > > > > > Uh, care to rewrite that since Python is now on 2.3 and 1.5.2 is > > > several years ol

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Gunnar Wolf
H. S. Teoh dijo [Mon, Nov 17, 2003 at 08:47:27PM -0500]: > > >*chalks up one more reason to avoid Python like the plague...* > > > > Uh, care to rewrite that since Python is now on 2.3 and 1.5.2 is > > several years old? > [snip] > > That doesn't negate the fact that I find significant w

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Steve Lamb
Tom wrote: Do whitespace mistakes cause compile time errors? The frustrating thing about fortran was variable names that started with C could be interpreted as comments not indented correctly, which would just cause that line to be skipped. Integer literals not indented correctly could be int

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Tom
On Mon, Nov 17, 2003 at 05:53:54PM -0800, Steve Lamb wrote: > Tom wrote: > >Significant whitespace? Shudder, that brings back crusty old memories > >of Fortran. I have great fondness for fortran because of the wonderful > >mathematical algorithms in LinPack, but I have no fondness for > >signi

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Steve Lamb
H. S. Teoh wrote: That doesn't negate the fact that I find significant whitespace rather atrocious. I really rather use a language where I'm free to format the code the way I want it, to maximally convey its meaning, rather than to be forced to write it a certain way because some genius decided tha

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Steve Lamb
Tom wrote: Significant whitespace? Shudder, that brings back crusty old memories of Fortran. I have great fondness for fortran because of the wonderful mathematical algorithms in LinPack, but I have no fondness for significant whitespace. And? Does Fortran's rules map to Pythons? I often

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread H. S. Teoh
On Mon, Nov 17, 2003 at 05:14:04PM -0800, Steve Lamb wrote: > H. S. Teoh wrote: > >On Mon, Nov 17, 2003 at 02:29:52PM -0600, Chad Walstrom wrote: [snip] > >>Python did away with that requirement for scope in 2.x. If you want to > >>use blank lines for code logic separation in python < 2.0, you mus

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Tom
On Mon, Nov 17, 2003 at 05:21:23PM -0800, Steve Lamb wrote: > H. S. Teoh wrote: > >On Mon, Nov 17, 2003 at 11:47:34AM -0600, Chad Walstrom wrote: > >[snip] > > >>I have a love-hate relationship with the significant whitespace. > > >I have a hate-hate relationship with it. I much prefer free-style

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Steve Lamb
H. S. Teoh wrote: On Mon, Nov 17, 2003 at 11:47:34AM -0600, Chad Walstrom wrote: [snip] I have a love-hate relationship with the significant whitespace. I have a hate-hate relationship with it. I much prefer free-style syntax where the programmer is allowed to use his best judgment on how to inde

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Steve Lamb
H. S. Teoh wrote: On Mon, Nov 17, 2003 at 02:29:52PM -0600, Chad Walstrom wrote: On Mon, Nov 17, 2003 at 02:19:02PM -0500, H. S. Teoh wrote: Also, as an off-topic note, blank lines that contain tabs or spaces are Pure Evil(tm), especially in code. One of these days I should write a sed script to

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread H. S. Teoh
On Mon, Nov 17, 2003 at 02:29:52PM -0600, Chad Walstrom wrote: > On Mon, Nov 17, 2003 at 02:19:02PM -0500, H. S. Teoh wrote: > > Also, as an off-topic note, blank lines that contain tabs or spaces > > are Pure Evil(tm), especially in code. One of these days I should > > write a sed script to elimin

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread H. S. Teoh
On Mon, Nov 17, 2003 at 08:07:35PM +, Jonathan Dowland wrote: > On Mon, Nov 17, 2003 at 02:19:02PM -0500, H. S. Teoh wrote: > > > For personal pet projects, I use 2 spaces per nesting level. Some people > > think that's Pure Evil(tm), > > Most noteably perhaps, Linus Torvalds, although... >

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Chad Walstrom
On Mon, Nov 17, 2003 at 02:19:02PM -0500, H. S. Teoh wrote: > Also, as an off-topic note, blank lines that contain tabs or spaces > are Pure Evil(tm), especially in code. One of these days I should > write a sed script to eliminate all incarnations of this Pure Evil(tm) > from /usr/src. Python did

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Jonathan Dowland
On Mon, Nov 17, 2003 at 02:19:02PM -0500, H. S. Teoh wrote: > For personal pet projects, I use 2 spaces per nesting level. Some people > think that's Pure Evil(tm), Most noteably perhaps, Linus Torvalds, although... >although I fully agree with you about wasting > screen real estate in 80 colu

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread H. S. Teoh
On Mon, Nov 17, 2003 at 11:47:34AM -0600, Chad Walstrom wrote: [snip] > I have a love-hate relationship with the significant whitespace. I have a hate-hate relationship with it. I much prefer free-style syntax where the programmer is allowed to use his best judgment on how to indent the code. Of c

Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Chad Walstrom
On Mon, Nov 17, 2003 at 11:13:59PM +0800, Cameron Patrick wrote: > I believe that tabs aren't a problem with Python so long as they > really do indent to a multiple of 8 spaces. Editors which interpret > tabs differently are broken^W^W can cause problems when editing Python > code with tabs and sp