Re: static class inheritance, generalized
- From: "Jon Skeet [C# MVP]" <skeet@xxxxxxxxx>
- Date: Wed, 06 Jun 2007 01:55:04 -0700
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
.
- Follow-Ups:
- Re: static class inheritance, generalized
- From: Frans Bouma [C# MVP]
- Re: static class inheritance, generalized
- References:
- static class inheritance, generalized
- From: Ben Voigt [C++ MVP]
- Re: static class inheritance, generalized
- From: Frans Bouma [C# MVP]
- static class inheritance, generalized
- Prev by Date: Re: static class inheritance, generalized
- Next by Date: Re: static class inheritance, generalized
- Previous by thread: Re: static class inheritance, generalized
- Next by thread: Re: static class inheritance, generalized
- Index(es):