3 ms·
> You gotta admit the situation is kinda similar. I disagree. 1. Everybody knows Python is a scripting language, and trying to do heavy computation without ha
by twtw 8y ago
> You gotta admit the situation is kinda similar.
I disagree.
1. Everybody knows Python is a scripting language, and trying to do heavy computation without handing it off to a library is going to be slow.
2. A vector is the de facto data structure for this in c++. In Python, numpy is effectively the de facto approach for math.
- bluescarni 8y agoSorry but I think this is still an apt analogy. 1. "Everybody" knows that unordered sets/maps in C++ must de-facto use chaining due to the requirements imposed by the standard. 2. numpy.array is not part of the Python standard library. It is an extra component you still need to install separately. As someone who deals regularly with novice Python users (often coming from Matlab & the likes), one of the very first points of pain/confusion is the fact that I need to teach/convince them not to use the facilities of the core language to represent "vectors".