C++ vs Python vs Mathematica vs Matlab? Whats the difference

Click For Summary

Discussion Overview

The discussion centers on comparing C++, Python, Mathematica, Matlab, and Julia, focusing on their differences, advantages, and disadvantages in various contexts such as programming, numerical computing, and symbolic computing. Participants explore the suitability of each language/platform for different use cases and environments.

Discussion Character

  • Debate/contested
  • Technical explanation
  • Conceptual clarification

Main Points Raised

  • Some participants note that C++ and Python are general-purpose programming languages, while Matlab is a numerical computing platform and Mathematica is a symbolic computing platform.
  • It is suggested that Python allows for faster programming, whereas C++ may execute faster.
  • Julia is introduced as a newer language with a syntax similar to Matlab but with execution speeds comparable to C/C++. It is highlighted for its interoperability with Python and Fortran and its cost-effectiveness.
  • Some participants emphasize that Matlab/Simulink is widely used in engineering but is expensive, while Python and Julia are free alternatives.
  • One participant mentions that neither Python nor Julia has a tool equivalent to Simulink for diagram-based simulations.
  • A participant expresses a preference for starting with Python or Mathematica for beginners, suggesting C++ only if speed is a critical requirement.

Areas of Agreement / Disagreement

Participants express a range of opinions on the best programming language or platform to use, indicating that there is no consensus. Different perspectives on the suitability of each language for various tasks and user backgrounds remain evident.

Contextual Notes

Some claims depend on specific use cases, such as the need for speed or the availability of resources like tutorials and development environments. The discussion does not resolve the effectiveness of each language in different contexts.

Who May Find This Useful

This discussion may be useful for individuals considering which programming language or platform to learn or use for numerical or symbolic computing, particularly in academic or engineering contexts.

Lagraaaange
Messages
82
Reaction score
0
What are the differences and pros/cons of each?
 
Physics news on Phys.org
C++ and python are general purpose programming languages. Matlab is a numerical computing platform. Mathematica is a symbolic computing platform.

The pros and cons depend on the desired use. Generally things are faster to program in python but faster to execute in C++. Matlab and Mathematica have different purposes.
 
There's also another kid on the block: Julia with a syntax similar to Matlab but with speeds orders of magnitude faster than Matlab ie near C/C++ speeds. Julia is especially useful for organizations that prototype algorithms in MATLAB and then convert them to C/C++ for production. With Julia, they don't have to spend developer time recoding and optimizing the Matlab code.

Julia Interoperates well with both Python and Fortran which is useful for handling legacy code and it's free.

The one thing Matlab has over Julia is its developer environment and its large base of tutorials, packages and tool kits.
 
  • Like
Likes   Reactions: FactChecker
It might help if you can narrow it down to an environment. MATLAB/Simulink is dominant in Engineering. It's expensive unless you are a student or work somewhere that already has it. Python is the hot new programming language. It is free. Julia is free. Neither Python nor Julia have the equivalent of Simulink (a diagram-based simulation tool). Where I work, we auto-generate code from Simulink diagrams. I don't know about Mathematica.
 
Dave Sanders on youtube has some good tutorials on Julia using the iPython notebook IDE which is really cool especially for presenting your work in an academic session.
 
I have zero programming knowledge.
 
Depends on the research.
 
Also what about MATLAB or Julia or Python for numerical computing vs Mathematica for symbolic computing?
 
As a first programming language I would not recommend C++. If you have easy access to Mathematica then it is a great platform for generic science and math. Otherwise I would probably recommend starting with Python. After either or both of those you might go to C++, particularly if you need a lot of speed.
 

Similar threads

Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 11 ·
Replies
11
Views
5K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K