12 ms·
Sometimes Python's conciseness works against its value as a didactic language.
by CamperBob2 3y ago
Sometimes Python's conciseness works against its value as a didactic language.
- Y_Y 3y agoThe original code looked like someone had learned old-school C++ and just shoehorned that into python. This phenomenon is all over physics. The fixed code isn't just short, it's idiomatic and clear (YMMV) and hence much easier to understand.
- nine_k 3y agoReasonably modern C++ would allow you to define a Counter class, and to define maps and filters, if the stdlib versions don't work for you for whatever reason. Fortran, on the other hand,...