The previous post glossed about why I now prefer Python to write code, including for a module like logopt. This post explains in more details some specific differences where I prefer one of these two languages:<br><ul><li>0-based indexing in python versus 1-based indexing in R.  This may seem a small difference but for me, 0-based indexing is more natural and results in less off by one errors.  No less than Dijkstra opines with me on <a href="https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html">0-based indexing</a>.</li><li>= versus &lt;- for assignment.  I like R approach here, and I would like to see more languages doing the same.  I still sometimes end up using = where I wanted ==.  If only R would allow &lt;- in call arguments. </li><li>CRAN versus pypi</li><ul><li>CRAN is much better for the user, the <a href="https://cran.r-project.org/web/views/">CRAN Task Views</a> is a gold mine, and in general CRAN is a better repository, with higher quality packages.</li><li>But publishing one CRAN is simply daunting, and the reason logopt remained in R-Forge only.  The manual explaining <a href="https://cran.r-project.org/doc/manuals/r-release/R-exts.pdf">how to write extensions</a> is 178 pages long.</li></ul><li>Python has better data structures, especially the Python dictionary is something I miss whenever I write in R.  Python has no native dataframe, but this is easily taken care of by importing pandas.</li><li>Object orientation is conceptually clean and almost easy to use in Python, less so in R.</li><li>Plotting is better in R.  There are some effort to make Python better in that area, especially for ease of use.  Matplotlib is powerful but difficult to master.</li><li>lm is a gem in R, the simplicity with which you can express the expressions you want to model is incredible</li></ul>All in all, I prefer coding in Python.  This is a personal opinion of course, and R remains important because of some packages, but for more general purpose tasks, Python is simpler to use, and that translates in being more productive. 