Which are the advantages and the disadvantages of the most common languages?
Do we have to work only with "low level" languages like C/C++?
There are really two kinds of languages:
- languages that are designed to minimize the time programmers spend programming
- languages that are designed to minimize the time computers spend computing
The first category are languages that are easy to program in. It is composed of interpreted languages: Python, Julia, R, MATLAB... The most popular free alternative is likely Python. In some domains, like biology or statistics, it might be R. If you feel the visceral need to cough up some cash, then you could buy a MATLAB license. They all offer easy ways to plot graphs, do complex mathematics (eigenvalues, inverse matrices, conjugate gradient, Monte-Carlo), query databases, the web...
The second category is composed of C/C++ and - God forbid - clunky old Fortran. They are harder to program but should be more computationally efficient. If the programs are well written.
The default option should be to minimize the time you spend programming and go with the first category. Your time is valuable, the computer's is cheap. So minimize the time you spend programming and maximize the time doing actual physics. As Google puts it (and they do a fair amount of compute): Python where we can, C++ where we must.
There is a tired argument that to do high performance computing it is absolutely necessary to use low level languages such as C and C++. However, most high-performance physics software will devolve the heavy lifting to external libraries, such as BLAS, LAPACK, FFTW, and others. In that case, whether there libraries are called from a language of the first or second category has little implication on the speed code.
Furthermore, most languages of the first category offer some easy way to interface with languages of the second category. Most physics software is such that the computer spends most of its time in 5% of the code, eg in the kernel. So it is always possible to move that kernel to C/C++ later on and interface with it in the interpreted language. The best of both worlds! Google Cython for the python way of doing this.
may not be true. Many people now a days work with MATLAB and matlab only.
Manu uses fortran.
It depends on the complexity of the problem, compatability and available resource and of course the ratio of desired out put to invested time.
Nowadays a common approach to your problem is to use Matlab or Mathematica or similar development environment. This makes thing easier at the beginning, because you do not have to take care about numerics.
I do not follow this approach and prefer to do my codes in C. You can use C++ or fortran either, and there is a popular discussion on ResearchGate about which language is the best for performance and code writing.
At the beginning it seems harder, but you can find many routines on the net for common numerical problems, overcoming easily the advantages of Matlab. The code written in C (or fortran or C++) run faster than in Matlab, therefore you can treat larger problems.
If you organize well you code, during the years, you can build your own library of routines or objects, making your work easier as the time passes.
Moreover, you can access all lines in the code, that can be very important for code debugging.
I suggest you to start with C, that is simpler than C++.
My major is mathematics & statistics, yet I read a wonderful on-line book related to computational physics which using Maxima & R. Because I used those two language in my research, hence I think they are quite well for computational problems. Particularly, both of them are open source software. Here is the link to that on-line textbook: http://www.csulb.edu/~woollett/#mbe
Hope this can help you!
I'm just a beginner but many users have very good opinions about Python as fast and easily applicable open source programming language.
Please see: https://www.python.org/
There are plenty of free tutorials and extentions dedicated to scientific projects.
Good luck!
C/C++ is not adapted to numerical calculations, it is intended to efficent low level coding. It would work, but there'll be many low level issues to manage that would be a lost of time and of attention (memory leaks and the likes.) Traditionally FORTRAN has been used, but they are other specific languages (Pascal/Modula 2, scala ...)
Python, Ruby and JavaScript are interpreted languages. They are easy to learn and to use, but not fast enough for intensive calculations.
There are really two kinds of languages:
- languages that are designed to minimize the time programmers spend programming
- languages that are designed to minimize the time computers spend computing
The first category are languages that are easy to program in. It is composed of interpreted languages: Python, Julia, R, MATLAB... The most popular free alternative is likely Python. In some domains, like biology or statistics, it might be R. If you feel the visceral need to cough up some cash, then you could buy a MATLAB license. They all offer easy ways to plot graphs, do complex mathematics (eigenvalues, inverse matrices, conjugate gradient, Monte-Carlo), query databases, the web...
The second category is composed of C/C++ and - God forbid - clunky old Fortran. They are harder to program but should be more computationally efficient. If the programs are well written.
The default option should be to minimize the time you spend programming and go with the first category. Your time is valuable, the computer's is cheap. So minimize the time you spend programming and maximize the time doing actual physics. As Google puts it (and they do a fair amount of compute): Python where we can, C++ where we must.
There is a tired argument that to do high performance computing it is absolutely necessary to use low level languages such as C and C++. However, most high-performance physics software will devolve the heavy lifting to external libraries, such as BLAS, LAPACK, FFTW, and others. In that case, whether there libraries are called from a language of the first or second category has little implication on the speed code.
Furthermore, most languages of the first category offer some easy way to interface with languages of the second category. Most physics software is such that the computer spends most of its time in 5% of the code, eg in the kernel. So it is always possible to move that kernel to C/C++ later on and interface with it in the interpreted language. The best of both worlds! Google Cython for the python way of doing this.
For those on a budget there is an open source program called Octave which provides some of the functionality found in Matlab. For prototyping and algorithm development Octave may be a good cost effective choice.
I'll say it depends if you want to concentrate on the Math or on the Physics:
Today my way, to do the Physics (in a large sense also including Chemistry, BioPhysics, Engineering ...): is to use programmes like FEM or Analytical high level tools.
For the Analytical ones I use Modelica based ones (I'm using mostly MapleSim with Maple behind, but several other programmes are Modelica based, freeware and paying), not all have the analytical tools behind as my favourite one.
For FEM approaches, I like definitively COMSOL Multiphysics: here you can find most of all physics prepared for you, but even if you are in a new field for which COMSOL has not set up the generic physics equations, you can always add your own via the Physics builder. In this way you work at the higher physics level, and are not spending all your time at the lower but essential algorithmic effort, also fun, but often taking most of your time away from your (my) true goal: understand, simulate, and use the results of the Physics of interest.
I do not even go back to Matlab or C or Java today, I can remain within the COMSOL environment.
To go this way you need to learn to express your model in PDE's though
And I do also have fun COMSOLing :)
Ivar
It depends on the field, if you want to simulate FEM, fluids, plasma, or only to make signal processing. To use formulas it is good MATLAB but if you want to conect to test equipment (to test if your fornmula is correct) then you should use labview.
If you are good as programmer and have to make a lot of equations per seconds you can use C/C++. A good option is use OpenCV library that have arrays, 2D and 3D viewers. OpenCV can be used in linux or windows SO.
For signal processing and instrument conectivity there is labview as I said before, that can use external C code for your own equations.
Accordingly it is said by Ivar, Comsol has a lot of flexibility for make FEM in a lot of different physics areas, but you should buy a lot of adds on.
Ivar, is COMSOL easy to make meshing?
I do agree with M. d'Avezac. If your code is not particularly heavy (for computational purposes) go with a high level language. Personally Python would be my choice for many reasons previously stated here: it's free, extensible with C/C++ (using many different methods, and also with Fortran), and many of the C libraries have Python APIs. I'm don't know the purpose of your project but you may want to look onto these libraries:
1) Vpython (http://vpython.org/) - 3D engine commonly used for physics simulations.
2) pyODE (http://pyode.sourceforge.net/) - Python bindings for ODE library, open dynamics engine (http://ode.org/).
Also if you do not require great accuracy you can try using physics engines developed for game development. They're designed for speed above all else but for macro behavior they should work fine: pymunk (http://www.pymunk.org/en/latest/), pybox2d (http://code.google.com/p/pybox2d/) are good examples.
Also if you intend to write your own engine you should look at "Extending Python with C/C++" topics all over the net (example: https://docs.python.org/2/extending/extending.html). You can do the same with numpy for example, or using the Cython language for Python optimization. This way you could be doing low-level programming in the bottlenecks instead throughout the entire code.
Funny that C/C++ is now called a low-level language - when I started, ASSEMBLY and machine code were the low-level ``languages'' to write fast code.
I still think learning C, C++, Fortran, Pascal or Basic and applying it to simple physics problems like percolation, diffusion-limited aggregation, ballistic motion of a projectile etc. is very benefitial for physicists even if one later uses more comfortable environments like Mathlab. Once you know how to program and can think in algorithms, all the more modern stuff will be easy. I do use Mathematica for symbolic manipulations and integrals but I often run into issues that are too hard for Mathematica (like integrals whose dimension is a variable and can go to infinity) and I go back, develop an algorithm and write my own C-code. To the people bashing Fortran, yes Fortran IV or 77 were clunky but newer versions like Fortran90 are basically identical to C. As for C++ versus C: the fancy object-oriented style often sounds interesting to students and has its advantages for larger projects but what I found was that there is the danger to get lost in the fanciness, meaning that the students who wrote in C got the job done and wrote fewer lines than the C++ lovers whose code was nice and portable but often took much longer if ever to become error-free. The statement of one of the commenters: don't waste time on math, focus on the physics, is in principle correct, at least for experimentalists. However, what if you, like myself, run into non-standard problems like nonlinear, singular integral equations where no software or general solution method exists? Forget asking mathematicians, I even asked a couple of guys from the Courant Institute; they are too busy with their own stuff and don't have the physics intuition to look behind the equation and see its essence that helps developing stable and accurate numerical methods to solve it.
I suggest that you use one of the computer algebra systems or the socalled symbolic programming languages.
It depends, if you want do everything by yourself or you plan to use things you already have or can get from colleagues. I worked with Fortran and C/C++ in statistical mechanics. Phyton is beginning to be widely used also.
Problem with Matlab is that is expensive and you are then limited to 3rd party platform, while with C or Fortran you can make whatever programs you need for any platform.
Mayeul d'Avezac makes some great points, but I object to him calling Fortran clunky.
How big a problem are you trying to solve?
Another consideration is whether or not the calculations you need to perform can be done simultaneously. If they can, then you will want to consider leveraging the available cores you have. Another question is whether the data is partitionable - if so, then you could make use of Message Passing Interface (MPI) in C/C++/Fortran which will allow you to share computations amongst clustered hardware.
HI:
C/C++ not low level Lang.
which Lang. you should use? . the one that you have a good experience in it.
Mathematica is best in it. Do not go for different languages. C++/C have their own limits. Also C# is not up to that level for complex computation. I had used last time mathematica and some what matlab for it. Both are good with their own limitations. Also there are built in functions for type of computations.
Let me start with a few key questions.
Which languages do you know already?
How large is the problem?
How complicated is the problem?
What do you want the answer to do?
Is there a specification that one program must do everything?
Now some not-answers:
If you already know a language well, and use it, you are less likely to spend large amounts of time discovering novel features of the software that only its designers love dearly. However, your language needs to be compatible with what you are trying to do.
If the problem is small, and number crunching, GWBASIC (there are several command line interpreted alternatives) may be the least painful. If the problem is large, you need to start looking at execute time. Once upon a time, Paul Whitford and I did two simulations on glass formation; you can find them in my list of papers. (He has now advanced from being an undergrad in my lab to a new faculty member at Northeastern, with several fine detours along the way). We had a point where we needed to compute a very very large number of trig functions. It was worth while to spend the time to test if calling a function was faster or slower than doing table lookup and interpolation. Function call was modestly faster, but when your compute uses machine-months of time on all the available machines, and one central calculation in a fundamental sense could not be parallelized,
If there are a lot of pieces, each to be called once or twice, something that is easier to write may be better, If it's lots of algebraic formulas, ForTran was written for that, though note the alternative Mathematica for algebra-> Fortran output-> fortran calculation.
I have used Mathematica, including several calculations that pushed the limits of what the software, compute speed, and memory store would do. Mathematica is very good at what it does, if you are doing something that runs in the directions the designer wanted. If you want it to do something that runs in a different direction, you may become extremely unhappy, though the software has certainly improved with time.
Is the answer a number? Do you want to generate a motion picture?
I use Fortran for numerics and Grapher -- accept no substitute, in my opinion -- for high quality graphics.
Your mileages may vary.
Rule 1: Can you do the calculation in a langauge you already know well. if so, stop there.
About Multicore programming, Boost C++ is a good option. Labview can be programmed in a multicore environment, to do it you must separate code pieces in blocks that works in parallel, then labview uses different processors for every block easily from the operator point of view.
I suppose that Matlab must work in parallel.
I think that the package used must have the option to use external C++ routines, or must be a library that can be used inside a C++ package.
The C++ must be designed for multicore.
It would be a plus to have a 2D and 3D engine and have a meshing algorithm.
For a high level non C++ scientist, he can decide between mathematica or matlab
I think that labview is the best option for high level experimental scientist.
I think David Bombač nailed it above: "It depends, if you want do everything by yourself or you plan to use things you already have or can get from colleagues."
1. Are you alone on this project, or do you need to interact with other people? If so, what are their skills? People who have spent the last 20 years honing their programming skills in language X are not about to let go this advantage easily. This also applies to people who are not participating actively in the project, but are advising you about it.
2. On the other hand, what is the foreseable future of your project? Is it a once-off (language is not important, take whatever is available right now and suits yourself best) or will it need to be maintained over the course of several years? In the latter case, will you be doing the maintanence youself, or will it be other people?
In any case, I would suggest starting out by defining a small part of your problem that is more-or-less representative of the whole, and programming that part in several different languages, perhaps those that have come out so far in this discussion. That way, you will be able to get some hands-on experience to see whether (a) each one of them suits the particular type of problem you wish to approach; (b) they run well on your available hardware; and (c) they are appealing (or not) to you and your team mates.
This may strike you as a bit of a waste of time at first, but in the long term you are making a valid investment since what you learn here will optimize how you go about the final project - and perhaps other projects later on as well.
Luck!
First of all I have to say that there is no such language called C/C++. Either you are writing C code or C++ code. It is possible to write fully procedural code in C++, but there are still differences to C, especially in the compiler. By today's standards C is considered a low-level language, but C++ is a high-level language that can also be used for low-level (i.e. close to the hardware) programming.
In my opinion there are three choices for large projects. But, first you have to decide if you have a large project. For 'simple' problems I agree with Mayeul that your time is too valuable to spend too much time in a complicated language compared to the time your computations need to run. In this case the language that you know best is the best choice. Almost any language can handle small numerical problems.
Not always, though, is this the right trade-off. For really complex problems when computations run for several hours or even days it is very important how fast your applications run. There is a huge difference between being able to run 1 or 2 simulations per day. If your simulations will run for several hours you should consider one of three choices: Python, C++, or Fortran (I have already found my favourite, but I am trying to be objective about the other two).
Python: This language has the advantage that it is easy to prototype your applications in this language. You will have fast development cycles. It is one of the few scripting language that is extensively used for numerical applications and has already been used for this a couple of years. There are many good bindings to great numerical libraries. There is NumPy and SciPy for general numerical methods and these are really, really fast. For more advanced topics: it is easy to do multi-threading in Python and there are bindings for MPI for use in distributed computing. If you want to go for the GPU there are bindings for CUDA and OpenCL. So, basically for the future there are no restrictions on how to squeeze out more performance from you simulation software without rewriting it in another language.
C++: Despite what others have written C++ is actually a good choice. Though I would advise against using plain C. In my opinion C is too low-level and has many disadvantages in large projects (unless you really know what you are doing). C++ has the strong advantage of a really strong type system. With the Boost library it is even possible to do unit checks. This can be very valuable in physical applications. C++ has the disadvantage that it is a very complex language and thus is hard to learn and master. If you use a modern coding style you will never encounter memory leaks. Don't do low-level memory management because you think it will give you better performance. It usually does not work! Be careful when to use pointers. Use smart pointers when you need to dynamically allocate memory; they are even part of the current C++11 standard. There is a vast choice of numerical libraries for C++ as well, e.g. the EigenLib for handling matrices. One huge advantage is the use of operator overloading which makes it a lot easier to transform your equations from a mathematical formulation into code. For best practices for good code I like to refer to Scott Meyers and Herb Sutter.
Fortran: This language has a long history in numerical applications (it's name is derived from FORmula TRANslator). Fortran used to be the fastest language for numerical applications. There are, however, discussions on RG that show that this is not the case anymore. At least C++ has caught up and is as fast as Fortran. I disagree that Fortran is an old, clunky language. This is certainly true for old legacy code. But, there are many modern features in the current version of the standard. It is possible to do serious programming in current Fortran. Don't think that with Fortran you are save from memory leaks. Every other month we have to hunt them down in our simulation software mostly written in Fortran. The type system of Fortran (concerning procedure calls) is very weak. Compilation can get really complicated if you want to turn on interface checking in the Intel compiler. One major disadvantage of Fortran is that you will not find much help for complicated programming problems. This is much better with C++ and Python.
Both Fortran and C++ provide good interfaces for parallelization. For multi-threading there is OpenMP which is well suited for many numerical problems. In many case it is sufficient to parallelize loops and this is very easy with OpenMP. For distributed computing there is MPI. It is probably not the easiest way for parallel programming, but there are no good alternatives to this kind of approach. Finally, CUDA is well supported in both language (one can even write CUDA kernels in a Fortran dialect), but OpenCL has only basic integration with Fortran.
If your problem is large enough you should aim for one of these three options. If you know any of these three languages, stick with it! It is not worth it to learn one of the other languages because you think you can get better performance. My favourite choice is C++ and I'd like to convert everybody to this language ;-) I don't have much experience with Python, especially not in numerical applications. I have a basic understanding and some expert knowledge of Fortran since I am working with it. But I am heavily biased against Fortran, mostly because I am working on some clumsy old legacy code. I believe it's a different thing when you start with modern Fortran from scratch.
C/C++ is not the same language but you can write C with any C++ compiler, some easy routines are made in C without classes and libraries.
I think there is not difficult to program Fortran, One of my first works was to make a CFD library for ANSYS. At the end before jumping to the next company the boss that knew only Fortran told me to migrate the 2 years work from C++ to Fortran, (that was one of the worse works in my life), but I learn Fortran and did the job in 15 days. Fortunately I do not use pointers in large scale projects.
What I mean by "There is no such thing as C/C++" is that not every C program will compile with a C++ compiler. C++ is not a true superset of C (though for most software this statement would be true). I am not sure about the most recent C standard, but things like implicit return types are just one example that don't work in C++. And there is a much stronger typing in C++. In addition, there is function overloading in C++ and as long as you don't use 'extern "C"' function names will be different for C and C++ (which would be a problem when interfacing with other languages). Even though it is possible to write entirely procedural code in C++, it does not make sense to not use things like std::vector and std::string. You don't need to write your own classes, but you should at least consider using existing ones to simplify your programs.
You can program a c code and compile it in VS2008 by writing in a file with a name "file.c" instead of "file.cpp".
You are true I will use C++ instead of C/C++ forever!
I used to program in C++ and I do it in the same way when program C in microcontrollers. In the past I used ansy C in multiplatform.
I had no problems when programming dlls in C++ to use extern C functions from labview, but it was a headache to debug them because I could not get into the dlls to read data there
You can also try using C#. If running time is not an issue (http://www.codeproject.com/Articles/212856/Head-to-head-benchmark-Csharp-vs-NET), then C#, in most cases, is much easier for programming. C# has also great advantages in threading and parallel execution.
Kentaroh Takagaki makes some extremely good points. The four (4) languages/environments he describes work quite well from my reading, as I have no first hand knowledge.
When you say computational physics, my assumption is that the calculations necessary are compute intensive. Given that, then each of the four (4) languages will be somewhat slower than the older C/C++/Fortran option. How much slower? It would depend on the specific calculations, the number of iterations the calculations make, how parallelized the problem can be made.
My biggest suggestion is getting the algorithms you need written, utilizing as much parallelism as possible. Once the algorithms are done, the best language to implement them in may become obvious. Additionally, just because the hardware you have access to only has 64 (or 128 or 256 or ... 1024 ... or ...) cores, don't put artificial constraints in your code. If the problem is embarrassingly parallel (http://en.wikipedia.org/wiki/Embarrassingly_parallel), don't limit the number of possible parallel tasks/threads. You never know when you will get to access a different machine (with additional resources - memory, cores) and always want to maximize resource utilization.
Dear Collegues,
all the discussions about programming languages become very popular.
I want just to point out a different point of view. All the discussion here is about TIME. Computational time, programming time and so on. I think that there is no doubt that Matlab, Mathematica and similar languages allow one to write codes faster and that C, C++, Fortran and similar ones produces faster codes.
But when a student have to write a code for computational physics project the first aspect to focus on is LEARNING. Obviously one can focus more on the physical aspects using matlab etc., but I think that using C/C++ end co. he will find a lot of problems, looking at the more basic aspects of the programming, making errors and troubling to find them, that is the path to learning. If a student plans to continue working in computational physics, than the time lost at the beginning to learn C (or similar) will be gained later when "things become serious".
Actually I don't think it was ever set clear by the topic owner if performance was an issue and if this is a student project (unless I've missed it). Those were all posterior assumptions. But I do agree with you that learning C/C++ is important on the long run although the time necessary to reasonably learn the language (specially without supervision) may be prohibitive for most people.
Just a couple of quick observations - as others have posted such wonderful answers already!
I didn't find programming in python any easier than ansi C - although I liked the visual python part a lot. For serious programming ansi C or newer fortran have pointers which make large simulations more practical. I don't see why python would be considered easier though? If learning C then spend an afternoon and read the Kernighan and Ritchie book - time well spent!
In terms of Matlab, and other commercial packages, there are often open source alternatives (although I've never programmed in them). Has anyone tried programming in Octave or Scilab, for example, instead of Matlab?
Depends, what you really need. Good solution is Fortran because of large library of ready aorithms and function dedicated to phisics but there are tools to import such into C or C++. In fact, C, C++ will be better now.
[RE: Gavin A. Buxton]
For loops and Boolean statements most languages will be pretty much the same since all of them follow the usual sequential logic. The reason why Python is considered to be an easier language is mainly due to the little time it takes to build a software with a considerable size (rapid application development). Even if that software has graphical user interface, database, 2D/3D visualization, physics engine and so on. Since you can use your Python code in real time (interpreter) debugging and experimentation becomes really easy. Also many have started to embed C/C++, Fortran and other languages in Python software so that performance is not so much of a problem (since native Python is slow by comparison with the before mentioned).
These qualities may sound a bit sparse at the beginning but the truth is that over time, since it was so easy to develop and integrate in Python, the open libraries/api's started to get some really extensive contributions with amazing results. Noticeable examples are Python numerical libraries (numpy, scipy, scikit-learn, among many others). With little effort in googling you'll probably find some library that does precisely what you're looking for.
I'm speaking by experience. I'm an geological engineer which knows how to program and not an actual university approved programmer. Nevertheless I've developed and release several open-source software simple because within a few months (learning Python) I knew enough to do it. Maybe not the most optimized of codes for a "real" programmer, but certainly doing exactly what a "geological engineer" would need.
Before Python I was actually working with Octave which is a language I found pretty good for it's intended purpose. The reason I've moved to Python (among other languages) was due to poor performance and serious limitations to developing a complete software solution (with GUI, visualization and so on...). Python was simple to learn and had many of the C/C++ libraries (because Python is C based it's easy enough to wrap C/C++ libraries into a Python one) so I made a deliberate choice.
I would never use a low level language for modeling. Actually, I am using Mathematica because you can do everything (numerics, graphics, animation, publishing, interactive programs) within a single framework, and you can also use parallel programs, graphic cards, etc. etc.
And: we solved the benchmark problems built in into Mma with MATLAB and Mathematica and Mma was in most problems faster.
just a hint. if you are going ot learn c++ dont make the mistake to use old books for this. Since c++11 many things have changed and a lot of the code can be written in a way that it is easier to understand and maintain. C++11 programms can be as easy to understand as python programs.
Whatever the language you choose, do yourself a favour and read the manual at least once. A lot of people use some programming language for years and have no clue about basic programming options and end using these languages very poorly.
To Gerald Weber's comment, please avoid the
"I can write FORTRAN in any language"
mentality. Taking over maintenance of such code is a killjoy for someone that actually *knows* the language.
Leverage what the language you choose offers. As an example, if it offers support for OpenMP directives, learn a bit about parallelism and exploit it (C/C++/Fortran).
As explained by others, it is not clear what you are after. Performance? Time spent programming? Time spent by the computer? Learning? Teaching?
I will add another consideration: future job. Let's be realistic, most Physics students do not end up doing Physics as a career: there just aren't enough positions.
A student should thus consider what job he might be doing in the future. If it is in engineering, maybe F90 is a good choice. If it is in finance, maybe C++ is worth learning. That will save time in the future.
Depending on the need I have used either low level or higher level codes. I used f77 years ago (14 to 12), and then f90, because computer performance was an issue. I chose f with respect to C(++) because of the libraries. Right now I do mostly analytic work and when I need to perform some numerical calculation or even a simulation I employ Mathematica. In fact I do not think I even remember f. The time I waste in computing is gained by time saved in coding, or processing the data--not to mention the avoided boredom.
Modularity is also an issue. For instance I just made a code in Mathematica that solves a problem easy and fast (say less than 2 seconds). However it needs to be inserted in a larger f90 code, developed by others, for various reasons. So I will have to "translate it" into a 10X longer code, and I dread the moment.
Matlab and Mathematica are good for faster problem solving. Python, C++ are well used languages nowadays. But Fortran and other old languages still have their own importance.