2 ms·
First of all, I think "embedding Matlab like DSL in C++" is never a good idea. You will be re-inventing Python or Julia, but with less features and more bugs. I
by theamk 3y ago
First of all, I think "embedding Matlab like DSL in C++" is never a good idea. You will be re-inventing Python or Julia, but with less features and more bugs. If you want to go C++, the best thing than engineers can do is to pre-create nice C++ dev environment, set up all the relevant libraries (Eigen/BLAS/Sophus) and give nice, clear examples of modern readable C++ and recommended language features. And then support the scientists with C++ questions. And I cannot overstate how important "recommended language features" is: modern C++ can be almost as concise as Python... but there is also a huge number of older C++ examples which do not use it and do things the hard way. (And yes, this is a great reason to avoid C++ in new projects)
The decision also depends on your application. For example if you have your usual ETL pipeline or a batch job, held together with bash and duct tape, then use Julia (or Cython, or Numba) by all means. Especially if script exits after each job, and script inputs/outputs are using common mechanisms, like files or SQL databases.
But I have also worked on C++ codebases which were distributed and latency-sensitive. In those cases, the numeric code might be a small part, and most of the code is input/output, logging and error handling, ensuring distributed consistency, and so on. I would never dream of embedding any other language there, not Python nor Cython nor Julia.