From: Gavin Sinclair Date: 2003-01-28T08:59:43+09:00 Subject: Re: ruby-dev summary 19380-19436 On Tuesday, January 28, 2003, 10:41:36 AM, TAKAHASHI wrote: > [ruby-dev:19387] standard ruby lib coding convension > NaHi asked to Matz for coding convension for standard > ruby library. Matz recommended to: > * use two-space indentation, no TABs > * use RDoc > * use camelCase for variable names and method names > * use camelCase for class names and module names > * use upper case separated by '_' for constants The standard library at the moment uses CamelCase for classes and modules and this_kind_of_case for methods and variables. Is that about to change? > [ruby-dev:19423] Numeric#quo > Matz announced that he implemented quotient method > Numric#quo. This method returns accurate value > as much as possible, using class Rational. > ex. 3.quo(2) => 3/2 (Rational) > There are some issues remained. > * Is the method name 'quo' appropriate? Good enough for me. 3.over(2) sounds natural but might be a bit colloquial. > * Should we make Rational into standard? That would be nice, barring potential portability issues. > * Does int.quo(float) and rational.quo(float) return > Rational or Float? These should be equivalent to Rational(a, b). I don't know how that behaves, but hopefully it's well thought out. Gavin