By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,819 Members | 1,173 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,819 IT Pros & Developers. It's quick & easy.

New Scientific Library - Lang?

P: n/a
Hello everybody!

I'm starting moving out my scientific library (neural networks) from
Delphi. Currently I'm being concerned with selection of a new language
for its development. The library uses the following very intensively:
memory allocation/deallocation, virtual method calls, accessing objects
by reference from other objects, methematical calculations (various -
arifmetic, triginometric), and employs collections much. It's also
important what the library does NOT use any input/output operations and
has nothing to do with user interface. But it needs to be used in other
programs that have UI.

I'm coding C# for the last couple of years and I'm starting to hear the
rummors that managed code (like rinning under Java VM or .NET CLR) is
getting closer in performance to the natively compiled code. It's
definitely HARD to identify the robustness of the performance tests
presented all over the Internet. Some of them are claiming that C++ is
dying in favor of managed code, because managed code can gain from some
optimizations (in virtual runtime environment) that can not be done
during the compilation phase.

I am also deeply concerned with cross-platform portability of the
library and the programs that will/would use it.

So, could I have some advice from you? What language should I use?
Please do not just say "C++" (or maybe other?), but also explain a
little!

Thank you in advance.
Andrey Kuzmenko.

Jul 23 '05 #1
Share this Question
Share on Google+
13 Replies


P: n/a
an************@yahoo.com wrote:
[...]
So, could I have some advice from you? What language should I use?
C++
Please do not just say "C++" (or maybe other?), but also explain a
little!


Why in the world anybody in a C++ newsgroup recommend you anything *but*
C++? Think about it. And what explanation are you looking for? C++ is
_the_ language for many in the programming business nowadays, it is
certainly _the_ language of choice for everyone who comes here on more
or less regularly.

You could ask in a language-neutral newsgroup, like comp.software-eng or
sci.math.*. Perhaps there you would get a less biased response. But be
aware that language comparisons are a futile exercise. Pick one and run
with it. Use whatever feels most comfortable.

V
Jul 23 '05 #2

P: n/a
an************@yahoo.com wrote:
Hello everybody!
[redacted]

I am also deeply concerned with cross-platform portability of the
library and the programs that will/would use it.

C++. Why? Because of the portability issue. C# is only available
under Windows.
Jul 23 '05 #3

P: n/a
andreykuzme...@yahoo.com wrote:
I'm coding C# for the last couple of years and I'm starting to hear the rummors that managed code (like rinning under Java VM or .NET CLR) is
getting closer in performance to the natively compiled code. It's
definitely HARD to identify the robustness of the performance tests
presented all over the Internet. Some of them are claiming that C++ is dying in favor of managed code, because managed code can gain from some optimizations (in virtual runtime environment) that can not be done
during the compilation phase.
I heard claims like this about Java for ages, too. Although it is
typically indeed possible to create fast Java solution which
outperforms a mediocre C++ solution, I don't think that the claims
hold water. I suspect the same to be true for .Net. However, even
if the claims concerning .Net are correct, C++ would be an
appropriate choice: Microsoft currently creates C++/CLR which
compiles to managed code. That is, you just toggle a switch and
get all the performance benefits (I'd guess you switch of targeting
the CLR but maybe I'm wrong; it would not even matter to you).
I am also deeply concerned with cross-platform portability of the
library and the programs that will/would use it.


As long as you stay clear of a few specific features (notably
'export') your library should be compilable with most up to date
compilers. If you are just interested in targetting many platforms,
not compilers, you can use the whole C++ standard and use Comeau
C++ which is available on virtually all platforms.

For algorithmic library, C++ has much to offer which other languages
do not: notably you can implement the time-critical portions STL-like
on the basis of some abstractions and use only dynamic polymorphism
where you really need it and/or in realizations of the abstractions.
--
<mailto:di***********@yahoo.com> <http://www.dietmar-kuehl.de/>
<http://www.contendix.com> - Software Development & Consulting

Jul 23 '05 #4

P: n/a
red floyd wrote:
C# is only available under Windows.


Strange... I used C# (with Mono) on my Linux machine. Maybe
Linux is now the same as Windows - I should really pay more
attention to the news!
--
<mailto:di***********@yahoo.com> <http://www.dietmar-kuehl.de/>
<http://www.contendix.com> - Software Development & Consulting

Jul 23 '05 #5

P: n/a
Mono ( http://www.mono-project.com ) is a port of .NET to Linux.

Jul 23 '05 #6

P: n/a
Of course I'm also exploring other opinions. And yes, I wanted a biased
response from C++ users, but with a little explanations. Thanks!

Jul 23 '05 #7

P: n/a
Dietmar Kuehl wrote:
red floyd wrote:
C# is only available under Windows.

Strange... I used C# (with Mono) on my Linux machine. Maybe
Linux is now the same as Windows - I should really pay more
attention to the news!
--
<mailto:di***********@yahoo.com> <http://www.dietmar-kuehl.de/>
<http://www.contendix.com> - Software Development & Consulting


I had forgotten about Mono. I hope they don't use "Is Not".
Jul 23 '05 #8

P: n/a
andreykuzme...@yahoo.com wrote:
Mono ( http://www.mono-project.com ) is a port of .NET to Linux.


Thanks for the clarification. However, I thought I was rather
clear without any special intonation or marking (see
<http://en.wikipedia.org/wiki/Sarcasm>).

BTW, I wouldn't call Mono a "port": it is an entirely independent
implementation of the corresponding specifications.
--
<mailto:di***********@yahoo.com> <http://www.dietmar-kuehl.de/>
<http://www.contendix.com> - Software Development & Consulting

Jul 23 '05 #9

P: n/a
Sorry, I wanted to reply for red floyd and just briefly tell what is
Mono... But occudentially responded to your message. Thank you for your
responses. BTW, did they (Mono) implemented the standard as completely
as Microsoft or there are some limitations?

Jul 23 '05 #10

P: n/a
Thanks a lot!

Jul 23 '05 #11

P: n/a
an************@yahoo.com wrote:
Sorry, I wanted to reply for red floyd and just briefly tell what is
Mono... But occudentially responded to your message.
No problem.
Thank you for your responses.
You are welcome.
BTW, did they (Mono) implemented the standard as completely
as Microsoft or there are some limitations?


My understanding is that Mono implements at least wants to implement
the ECMA standard plus some of the components provided by Microsoft
which are not standardized. They also have their own replacements
for some the Microsoft libraries. However, this discussion is
off-topic in comp.lang.c++ and better answered on the Mono site.
--
<mailto:di***********@yahoo.com> <http://www.dietmar-kuehl.de/>
<http://www.contendix.com> - Software Development & Consulting

Jul 23 '05 #12

P: n/a
an************@yahoo.com wrote:
Hello everybody!

I'm starting moving out my scientific library (neural networks) from
Delphi. Currently I'm being concerned with selection of a new language
for its development. The library uses the following very intensively:
memory allocation/deallocation, virtual method calls, accessing objects
by reference from other objects, methematical calculations (various -
arifmetic, triginometric), and employs collections much. It's also
important what the library does NOT use any input/output operations and
has nothing to do with user interface. But it needs to be used in other
programs that have UI.

I'm coding C# for the last couple of years and I'm starting to hear the
rummors that managed code (like rinning under Java VM or .NET CLR) is
getting closer in performance to the natively compiled code. It's
definitely HARD to identify the robustness of the performance tests
presented all over the Internet. Some of them are claiming that C++ is
dying in favor of managed code, because managed code can gain from some
optimizations (in virtual runtime environment) that can not be done
during the compilation phase.

I am also deeply concerned with cross-platform portability of the
library and the programs that will/would use it.

So, could I have some advice from you? What language should I use?
Please do not just say "C++" (or maybe other?), but also explain a
little!


You can't use (template) functions as objects in Java, but you can in
C++; which will be a big advantage if you want to program the transition
functions of the NN nodes like that, and genetic transformation of them.
Java might be 'more OO' so to speak, but at a functional level C++ is a
lot more flexible.

I would however recommend using C++ combined with Lua for this kind of
project. You use C++ to program the structure of the NN, and then you
use Lua to fill in the details (transitions, genetic pools, and problems
it needs to solve).

--
- gipsy boy
Jul 23 '05 #13

P: n/a
- C# is closer to Delphi than C++ is.
- The C# debugger is easier and much more pleasant to use than a C++
one.
- C++ will almost certainly always be faster
- C++ is platform independant. C# is not.
- C++ has many more free ressources that you could use than C#.
- C# is still evolving a lot and depends on what MS decides to do with
it in the future. Think about the VB 6 developpers.

Myself I would use C# because I favor the speed of dev and debugging.
Others will favor C++ for their own reasons.

--
----
http://michael.moreno.free.fr/

Jul 23 '05 #14

This discussion thread is closed

Replies have been disabled for this discussion.