generic arithmetic (or the lack thereof)

G

Guest

I'm sorry, but this is just the height of stupidity.

I love the dot net framework. It has actually been sufficient to convert an
anti-microsoft extremist (myself) to the windows camp. But not having
numerical value types inherit from an interface to allow for arithmetic in
generics, or in some other way allow arithmetic in generics without a
performance killing or ugly work around is just the epitomy of idiocy.

Yes, microsoft today is dominant in most areas of computing. Yet there are
still quite a few enclaves of linux, unix, or "anything but microsoft" hold
outs. Some of the most significant of these are in the scientific community.
It's fascinating to see how much some physicists will put themselves through
just to avoid Windows. This, of course, is also a group which will program in
Fortran or C for the sake of speed (oblivious to the fact that better, more
readable programs would make them easier to optimize, and I could go on).

And what has Microsoft done to woo this group? Well, as I understand it
floating point arithmetic is slow in the dot net framework. I understand that
this is supposed to be improved in version 2.0. Then there's no native
support for complex arithmetic. There are quite a few libraries out there
now, but there weren't many originally. Now the true power of generics is
largely denied to us, the arithmetic workarounds being too slow or too ugly
for the kinds of things we would use them for.

I understand that scientists and mathematitians account for very little of
the current potential market for the dot net paradigm. But This is precisely
the group microsoft should be trying hardest to court. We are building the
foundations of the technological revolutions that will define the industries
of the future, and some few of our number may be major players in these new
industries. Microsoft should want very badly for them to not be Linux lovers.
What's more, as a group we are a pretty creative and innovative bunch. Who
knows what spectre of a competing operating system may arise out of our
anti-windows enclaves to haunt microsoft.
 
J

John Davison

PDHB said:
I love the dot net framework. It has actually been sufficient to convert an
anti-microsoft extremist (myself) to the windows camp. But not having
numerical value types inherit from an interface to allow for arithmetic in
generics, or in some other way allow arithmetic in generics without a
performance killing or ugly work around is just the epitomy of idiocy.

AFAIK C# 2.0 supports the same "generics" syntax as Java 1.5. I'm not
clear what effect or benefits this would have for computationally
intensive code. I'm also not sure why you think arithmetic without
generics is performance killing or ugly. They've been doing it in Java
for years now. Perhaps some code examples might help explain your point
here.
Yes, microsoft today is dominant in most areas of computing. Yet there are
still quite a few enclaves of linux, unix, or "anything but microsoft" hold
outs. Some of the most significant of these are in the scientific community.
It's fascinating to see how much some physicists will put themselves through
just to avoid Windows. This, of course, is also a group which will program in
Fortran or C for the sake of speed (oblivious to the fact that better, more
readable programs would make them easier to optimize, and I could go on).

I doubt your average physicist would code in C for the sake of speed.
They would code in Fortran, or Java, or whatever programming language
they happen to know well, or they will hire a Programmer to do what
Programmers do best, while the physicist runs off and does what they do
best.

There are a ton of programming languages/frameworks out there that the
scientific community can draw from, and the .NET is only one of them.
For some applications I don't think it's the best choice, for others I
do. It depends on what needs done.

And I think we all know why the scientific community tend to flock away
from Windows machines. There's no need to argue that anymore.
And what has Microsoft done to woo this group? Well, as I understand it
floating point arithmetic is slow in the dot net framework. I understand that
this is supposed to be improved in version 2.0.

Is there proof of this? If not, then why do you think that?
Then there's no native
support for complex arithmetic. There are quite a few libraries out there
now, but there weren't many originally. Now the true power of generics is
largely denied to us, the arithmetic workarounds being too slow or too ugly
for the kinds of things we would use them for.

Why would there need to be native support for complex arithmetic? (I
assume you are talking about complex numbers.) You can build support
for it with the building blocks provided by the framework, or you can
use a programming language/framework built specifically for whatever
kind of math you're trying to do.
I understand that scientists and mathematitians account for very little of
the current potential market for the dot net paradigm. But This is precisely
the group microsoft should be trying hardest to court. We are building the
foundations of the technological revolutions that will define the industries
of the future, and some few of our number may be major players in these new
industries.

Why would the scientific community care either way about .NET? If .NET
comes out with something useful to them, then so be it. If not, who cares?

..NET is generic enough for any discipline to use and build on. I think
that's a part of what they're aiming for here. As for your claims of
arithmetic performance issues, I would like to see some proof.

John Davison
Compass Engineering Group
 
B

beliavsky

PDHB said:
I'm sorry, but this is just the height of stupidity.

I love the dot net framework. It has actually been sufficient to convert an
anti-microsoft extremist (myself) to the windows camp. But not having
numerical value types inherit from an interface to allow for arithmetic in
generics, or in some other way allow arithmetic in generics without a
performance killing or ugly work around is just the epitomy of idiocy.

Yes, microsoft today is dominant in most areas of computing. Yet there are
still quite a few enclaves of linux, unix, or "anything but microsoft" hold
outs. Some of the most significant of these are in the scientific community.
It's fascinating to see how much some physicists will put themselves through
just to avoid Windows. This, of course, is also a group which will program in
Fortran or C for the sake of speed (oblivious to the fact that better, more
readable programs would make them easier to optimize, and I could go
on).

I am an ex-physicist who does number crunching in Fortran 95 on
Windows. Fortran has advanced much beyond the Fortran 77 or Fortran IV
that many people associate with "Fortran". It is not clear to me that
math code would be more readable in C# than Fortran 95. Does C# have
built-in operations on arrays and array sections, as F95 does?

Although I happily use Windows, I don't want to become too dependent on
Microsoft. It reassures me that Fortran compilers are available for the
Mac OS X and Linux platforms, including Linux clusters. I don't want to
rewrite my code if it turns out I cannot or do not want to use
Longhorn, the next version of Windows.
 
G

Guest

:

AFAIK C# 2.0 supports the same "generics" syntax as Java 1.5. I'm not
clear what effect or benefits this would have for computationally
intensive code. I'm also not sure why you think arithmetic without
generics is performance killing or ugly. They've been doing it in Java
for years now. Perhaps some code examples might help explain your point
here.

It's not that arithmetic without generics is ugly or performance killing. I
want to be able to do intensive computations with generics without paying a
penalty in either performance or ugliness.
I doubt your average physicist would code in C for the sake of speed.
They would code in Fortran, or Java, or whatever programming language
they happen to know well,

Most I know use Fortran or C, and speed is generally one of the reasons they
give. Some use C++, but generally the keywords 'class' and 'struct' do not
appear in their code. When they do, 'dispose' is usually missing. I'm not
sure, but I imagine object oriented versions of Fortran are usually treated
in the same way.
or they will hire a Programmer to do what
Programmers do best, while the physicist runs off and does what they do
best.

So very often we don't. We write our own programs, do our own electrical
engineering, our own mechanical engineering, etc. There are actually some
good reasons for this, which I won't go into here, but it does go too far, I
believe.
There are a ton of programming languages/frameworks out there that the
scientific community can draw from, and the .NET is only one of them.
For some applications I don't think it's the best choice, for others I
do. It depends on what needs done.

And I think we all know why the scientific community tend to flock away
from Windows machines. There's no need to argue that anymore.


Is there proof of this? If not, then why do you think that?

I believe I saw a few allusions to this in articles here, and I thought this
was a general understanding. If I am wrong, glory be. C# definitely not
optimized for multidimentional array computations.

"http://msdn.microsoft.com/msdnmag/issues/04/03/ScientificC/"

Why would there need to be native support for complex arithmetic? (I
assume you are talking about complex numbers.) You can build support
for it with the building blocks provided by the framework,

One can build one's own windows as well, but it's nice not to have to.
Likewise it's nice to have a complex library in C++.
or you can
use a programming language/framework built specifically for whatever
kind of math you're trying to do.

The point is I like C# for productivity sake. With a few relatively small
adjustments, such as numeric value types ingeriting a common interface, it
would be a lot more useful for scientific purposes.
Why would the scientific community care either way about .NET? If .NET
comes out with something useful to them, then so be it. If not, who cares?

The point is, Microsoft should care.
And as for the scientific community, the sheer volume of blood spilled by
scientists beating their heads against the wall over C and C++ would boggle
your mind. A language like C#, quick to learn, simple to use, and with enough
constraints to encourage at least a minimum of good coding practices, could
prevent all this needless self flagulation, make the government dollar spent
on science go further, and could win over some of this group to Microsoft.
 
G

Guest

It does support this.

on).

I am an ex-physicist who does number crunching in Fortran 95 on
Windows. Fortran has advanced much beyond the Fortran 77 or Fortran IV
that many people associate with "Fortran". It is not clear to me that
math code would be more readable in C# than Fortran 95. Does C# have
built-in operations on arrays and array sections, as F95 does?

Although I happily use Windows, I don't want to become too dependent on
Microsoft. It reassures me that Fortran compilers are available for the
Mac OS X and Linux platforms, including Linux clusters. I don't want to
rewrite my code if it turns out I cannot or do not want to use
Longhorn, the next version of Windows.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top