From: Eivind Eklund Date: 2004-10-16T00:03:06+09:00 Subject: Re: documentation as source On Fri, 15 Oct 2004 23:17:42 +0900, Nathaniel Talbott wrote: > On Oct 14, 2004, at 23:42, trans. (T. Onoma) wrote: > > > On Wednesday 13 October 2004 09:19 pm, Nathaniel Talbott wrote: > > | Well, the current plan is to let you to do something like this: > > | > > | class Adder > > | include Testing > > | > > | # Adds two numbers > > | example { assert_equal(2, Adder.new.add(1, 1)) } > > | def add(a, b) > > | a + b > > | end > > | end [...] > > 2. Detracts from the code itself. > > Why? I'll take this one. For me: * My brain is conditioned to automatically "ignore" lines that start with # - they're there as documentation, but they are very clearly separate from code * They're automatically highlighted "away" in my editor. So far, I prefer Florian's approach - however, it may be this works out OK in a highlighting editor (because def gets highlighted). In black and white, Florian's is much easier to read, and less overhead, though. Eivind. -- Hazzle free packages for Ruby? RPA is available from http://www.rubyarchive.org/