Re: static class inheritance, generalized

Tech-Archive recommends: Speed Up your PC by fixing your registry



On Jun 6, 9:21 am, "Frans Bouma [C# MVP]"
<perseus.usenetNOS...@xxxxxxxxx> wrote:

<snip>

What you're suggesting is IMHO running into problems very quickly.
With 'Sin' and 'Cos' you might not have duplicates in scope, but what
if you have?

Then you generate a compile-time error saying that you've got to
disambiguate.

Furthermore, the necessity which makes you want what you're
suggesting is the friction between procedural programming and OO
programming: math methods and calculation methods are typical
procedural methods/routines, which don't really fit into the OO paradigm,
unless you'd add Sin() as a method of an int or double for example.

So what do you suggest to make life nicer for those who are doing a
*lot* of trigonometry etc in code?

When used sparingly, it can really improve things IMO. Yes, it goes
against the OO nature of C#, but not everything is cleanly expressed
in OO terms.

Jon

.