On 7/11/06, Kobayashi Noritada <nori1@dolphin.c.u-tokyo.ac.jp> wrote:
> Hi,
>
> > I was looking at the remaining backport proposals, and this one stuck
> > out in my mind. Is it really a valid change from a backwards
> > compatibility standpoint? What about old code that expected
> > Dirent#time to return an integer?
>
> Thank you for reviewing the change (and for getting on the 1.4.0 releasing
> process). As a patch submitter and merge nominator for that change, I'll
> try to answer on behalf of Kouhei, the SWIG/Ruby binding comitter.
>
> Dirent#time should return a Time because of its name. Returning a Time is
> a correct behaviour and returning an Integer is not so good. The Integer
> value is completely useless because it cannot be converted without knowing
> what APR-time integer means and how to convert it to a Time. Other
> methods returning time-related values already do that conversion inside
> and returns a Time, and Dirent#time follows that manner in this change.
> So, I think this is an improvement close to a minor-buglet fix.
>
> Those who expect it returns an Integer can now use Dirent#_time to get
> the value, but no one would like to do so... (I wonder how many users
> have used older Dirent#time without getting skeptical about the behaviour.)
>
> I hope I can have answered your question. :-)
That makes perfect sense, but it still breaks our compatibility policy
by making people fix their code when they upgrade. There are a lot of
functions in the public Subversion API that I'd LOVE to change to make
them "better" in some way, but I can't because people are already
using them. Aren't there potentially already people using the
Dirent#time method from 1.3.x who are assuming it returns an integer?
So, in short, no argument that it's a better API, but that doesn't
make it right.
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 11 18:10:44 2006