From: Austin Ziegler Date: 2004-01-09T14:04:33+09:00 Subject: Re: block delimiting On Fri, 9 Jan 2004 13:13:33 +0900, Pete Yadlowsky wrote: > On Thursday 08 January 2004 11:01 pm, Austin Ziegler wrote: >> Style guides. It's not up to the interpreter to tell me what my style >> should be. > The Ruby interpreter does tell you what your style should be. It forces > you to mark every block of code with "end". For my preferred style of > coding, this is unnecessary and objectionable, or at least suboptimal. That's not style. That's syntax. What you're saying is little different than saying that if (!foo) { bar(); baz(); should be legal in C/C++/Java. I'm also doing a lot of work in Delphi right now, and so it's very natural for me to do: If (Not Foo) Then bar; baz; End; Someone suggested that SSW is objectionable if you have very large methods. I would suggest that if any method is longer than a screen, you may want to refactor it, because otherwise you will see things like: if (foo) { <2 screens> } // if (foo) When you enforce a particular spacing, you are enforcing a style preference, not purely syntax. (Often, Python's SSW supporters will use natural languages as an example. It doesn't work, because aside from tokenisation, there is no SSW in English, for example. Paragraph separation isn't *syntactically* significant, even if it helps with meaning, for example.) That said, I prefer explicit block endings; there's too much room for error otherwise. Plus, I don't think that Ruby's block/proc/lambda mechanism works as well without explicit block endings. -austin -- austin ziegler * austin@halostatue.ca * Toronto, ON, Canada software designer * pragmatic programmer * 2004.01.08 * 23.55.26