What is the Best Object-Oriented Language for Scientific Computing?

Click For Summary

Discussion Overview

The discussion revolves around the selection of the best object-oriented programming language for scientific computing, particularly in the context of transitioning from C to an object-oriented language. Participants explore various languages, their performance, ease of use, and suitability for scientific simulations.

Discussion Character

  • Exploratory
  • Debate/contested
  • Technical explanation

Main Points Raised

  • One participant suggests focusing on C++ first, implying it may ease the transition to object-oriented programming (OOP) before exploring other languages.
  • Another participant argues against spending time on C++ or Java, advocating for Python due to its ease of use and strong community support for scientific computing and visualization.
  • Concerns are raised about Python's performance, with one participant noting that while it may be slower, libraries like NumPy and SciPy can enhance its speed by leveraging C.
  • A participant mentions that switching from C to C++ could be easy, but warns that it might lead to adopting poor OOP practices from C.
  • There is a sentiment that learning multiple languages could be beneficial, allowing the user to choose the best tool for specific tasks.

Areas of Agreement / Disagreement

Participants express differing opinions on the merits of C++, Java, and Python for scientific computing. There is no consensus on which language is definitively the best choice, as various viewpoints highlight different strengths and weaknesses of each option.

Contextual Notes

Participants express uncertainty regarding the performance of Python compared to C and C++, particularly in intensive computational tasks. The discussion also reflects a range of experiences with programming languages and their applicability to scientific simulations.

Who May Find This Useful

This discussion may be useful for students and professionals in theoretical physics or related fields who are considering which programming languages to learn for scientific computing and simulations.

Grieverheart
Messages
30
Reaction score
0
I'm in my first year of theoretical physics master and I'm considering of following the path of scientific simulations. At the moment I use C for my simulations. I would additionally like to learn an object oriented language. I followed a course in Java about 2 years ago, so that would be easier to learn again. What I generally need is an object oriented language with high performance, easy implementation of parallel programming and visualisation of results. Also I think I'm going to learn C++ since it's used everywhere, so I don't know if it's worth learning any additional object oriented language. I want to focus on the things I said above but I would like to have some flexibility in other areas too.
So, any suggestions?
 
Technology news on Phys.org
Why don't you focus on C++ first and then see if OOP comes easily to you. After that you can start branching out even more.
 
I wouldn't waste my time on C++ or that other language that tried to overcome C++ shortcomings (Java).

You should look into Python!

Python is very easy to use. You can start programming in a non-OOP manner and start including objects as you see fit.

Also, there is a huge engineering/scientific community behind Python. There are many tools for scientific computing and for visualization.

Should Python not be fast enough for intensive number crunching operations, you can write that particular part in either C or Fortran and easily call it from Python.
 
If you already know C, switching to C++ will be relatively easy. At the same time it will mean your OOP will inherit bad habits from your C programming, that's typical.
 
I have done OOP in Java although that was quite some time ago. I was going to learn python at first, it seems to fit for most of my needs but it seems really slow. I read it can get close to C, C++ speeds with NumPy/SciPy (which are actually using C). That doesn't feel quite right :S . I guess in the long run it's best to learn several and use every language at where it's best.
 

Similar threads

  • · Replies 15 ·
Replies
15
Views
4K
Replies
86
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 133 ·
5
Replies
133
Views
12K
  • · Replies 397 ·
14
Replies
397
Views
21K
  • · Replies 1 ·
Replies
1
Views
3K