7 ms·
That only saves a few characters. And "map" is already a data type in C++. How are you going to explain to a student that ambiguity, that you can "map a vector,
by Timmah 8y ago
That only saves a few characters. And "map" is already a data type in C++. How are you going to explain to a student that ambiguity, that you can "map a vector, but oh yeah map is also this container type" ?
Conceptually, I hate the word "map" to describe a transform. What does a real-world, paper map do? It associates locations drawn on the paper with real-world, physical places. That doesn't have any commonality whatsoever to morphing a group of objects. The term is misused.
- mschuetz 8y agoIt removes enough characters to turn it from unreadable mess to legible code. Point is mainly to remove the 3 completely unnecessary parameters, doesn't matter if it's called transform or map.