Hacker News new | ask | show | jobs
by donald_draper 5225 days ago
Which makes it easier to translate into typical procedural languages like c and c++, which is not completely irrational to assume for embedded systems like robotics. And because many tricks and concepts will be array-index-based, you can just go ahead and use them right from the start.
1 comments

In reply to both sks and donald_draper:

I agree that simplicity of learning is a good goal. This is why I didn't raise the issue of the several dozen times where he uses an very ugly for loop where a very nice list comprehension would be the Pythonic thing to do. Being Pythonic is not the highest goal in software, I get that, and if you're trying to focus on learning robotics rather than learning Python, list comprehensions add friction.

But in the case of iteration across a list, using an idiomatic iterator is far from unique to python, and it's very readable to someone who has never seen it.

And I thought about the C/C++ thing, but the reason I said "Pascal programmer" rather than "C programmer" is because surely no-one trying to ease the translation to C would have used all those list.append() calls with which Sebastian is so liberal.