David A. Black a écrit :
Hi --
[I wrote:]
That's different; that's a class method.
In present ruby, yes, C::util is identical to C.util.
But I was thinking of "C::util" as an explicit namespace specification, not as a message sending to C object.
You talked about adding some "#" new operator could be inadequate as it is usually used for comments. I was just indicating "::" could do the job.
These last two don't really fit the dot semantics, and if they're
alternatives to C::util, then they're dealing with a class method
anyway (rather than the issue of limiting the effect of overriding
instance methods).My suggestion of C#util is based on the common use of # to mean
"instance method of the named class or module". It wouldn't require
redefinition of the dot notation, nor overloading 'self' to be a
boolean flag (as in the original proposal, where 'self' means both
"the default object" and "don't redirect this to an overridden version
of the method).And what is your opinion, now, if you take for granted that "::" semantic is redefined?
I think it's much too big a change for something like this. It would
also lead to huge amounts of code breakage. (I don't use :: for
method calls myself, but it's used a fair amount.)
I use it for constants. Does anybody use it for something else?
If not, then only constants would be affected. And the namespace semantic wouldn't change much how things work for constants, don't you think?
Or I am missing some points, somewhere, as usual. ![]()
···
On Sun, 10 Apr 2005, Lionel Thiry wrote:
--
Lionel Thiry