From: Jeremy McAnally Date: 2008-07-25T12:01:01+09:00 Subject: Re: inline comments in future release? total_charges = line_charge_1 + line_charge_2 + misc_charges No comments needed...? --Jeremy On Thu, Jul 24, 2008 at 9:43 PM, Peņa, Botp wrote: > From: Michael W. Ryder [mailto:_mwryder@worldnet.att.net] > # The best way to provide in-line documentation is to use names that > # document what you are doing. Instead of writing x += y, writing: > # total_bill = total_bill + line_charge would make it far > # easier to find a problem when the figures were wrong. > > indeed. > > on my case, i want simple vars, so, > > > > # add line charges to total t > t += c1 + c2 + misc > > > > t += c1 + c2 + misc # add line charges to total t > > > > # total charges t equals > t += c1 + # line charge 1 plus > c2 + # line charge 2 plus > misc # miscellaneous > > > > nonetheless, style is in the eye of the beholder ;) > > # I think it is much clearer than > # using something like: x /* total bill amount */ += y /* line > # charge */. > > ouch, that is too much. Is that a regex or what? :) > > Kind regards -botp > -- http://jeremymcanally.com/ http://entp.com/ http://omgbloglol.com My books: http://manning.com/mcanally/ http://humblelittlerubybook.com/ (FREE!)