From: Trans Date: 2007-03-24T21:03:53+09:00 Subject: Re: About class methods visibility (public/private) On Mar 23, 10:27 am, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: About class methods visibility (public/private)" > on Fri, 23 Mar 2007 18:34:22 +0900, "Trans" writes: > > |Ick! When did those get in there? I'm almost glad I never noticed > |before. Why bother? Just give us a method for singleton/eigenclass/ > |metaclass whatever you want to call the "context" and allow: > | > | context.public :foo > > (Unlike Java and such) visibility in Ruby are very trivial, so I don't > want to make things more complex for the sake of visibility. I'd > rather remove them altogether unless compatibility problem arise. Works for me. Although I don't think the above statement itself is complex. It's pretty straightforward Ruby, sending a message to the singleton. > |But if they've got to stay, please, at least consider renaming them > |something like class_public and class_private. > > if public/private/protected are called without method names, it > switches the default visibility. public_class_method and such does > not this trick. Renaming public_class_method to class_public does not > sound right for me, since it strongly suggest the changing the > default. I see. T.