From: Gavin Sinclair Date: 2002-09-13T14:53:26+09:00 Subject: Re: Larry Wall's comments on Ruby ----- Original Message ----- From: "Christoph" Newsgroups: comp.lang.ruby > Actually I don't really mind so much writing abs(x) or sin(x) > but I just cannot get over the ``Math'' prefixes Math.cos(x), > Math.sin(x) .... they are reaaally tacky. > > In the absence of Namespaces (which are a much better > solution then the proposed Numeric mixins) things would > not be that bad if Math was at least a class (with disabled > new/allocate) - at least I could write > > class MyMathNameSpace < Math; end > > class << MyMathNameSpace > def sin_squared(x) > sin(x) * sin(x) > end > end Pardon my ignorance, but I don't see what the alternative to Match.cos(x) is, nor do I understand the talk of namespaces. The only alternative to Math.cos(x) is Kernel::cos(x), isn't it? That would eventually lead to name clashes. Is namespaces a solution here? > /Christoph Gavin