From: gabriele renzi Date: 2005-04-24T18:39:32+09:00 Subject: Re: [ANN] Article: Seeing Metaclasses Clearly Mathieu Bouchard ha scritto: > > On Thu, 21 Apr 2005, gabriele renzi wrote: > >> ah! this is something I always wanted to know, I've been always >> thinking on the lines of "why are'nt method just defined in the >> object? do we need this singleton class thing?" > > > Because of backwards-compatibility with C++/Java/Perl/Python programmers. > > Most backwards-compatibility issues occur wrt the _programmers_ and not > so much wrt the _programmes_. > I don't understand, sorry. Python programmers for sure can define singleton methods directly in a object without singleton classes, I guess perl folks too, since an object is mostly an hash (I may be wrong, not really good at perl). Actually, only Java's anonymous classes seem somewhat similar to singleton ones. I agree with you that some backward compatibility issues may be programmer-based, but I don't think this is a case.