5 ms·
Why is it an obvious footgun?
by mda 4y ago
Why is it an obvious footgun?
- dleslie 4y agoA developer familiar with C++ may believe it to be a fixed length container (perhaps with automatic bounds checking[0]) and treat it as such in memory/security/performance critical sections. 0: https://en.cppreference.com/w/cpp/container/array/at https://en.cppreference.com/w/cpp/container/array/at
- xigoi 4y agoAnd if they named it “vector”, a developer familiar with mathematics might believe it to be a vector.
- bmacho 4y agoWhich is not a footgun.
- Banana699 4y agoIt actually can be, mathematical vectors gaurantee for example that x+y == y+x for all x,y, but no such gaurantee can be ever made on the user-defined operator+, indeed you can't even gaurantee that it is defined to begin with, let alone in the manner prescribed by linear algebra.
- dleslie 4y agoThe language is designed to replace, by progression, C++ for C++ developers. Mathematicians are probably better suited to using R, Julia, Octave, or Wolfram.
- deleted 4y ago[deleted]