8 ms·
This is about weighing correction versus readability. In the "arrow operator" version, the readability is decreased; in the "proper" version, a type cast is req
by yoha 10y ago
This is about weighing correction versus readability. In the "arrow operator" version, the readability is decreased; in the "proper" version, a type cast is required, and this can lead to bugs with values greater than 2^sizeof(ssize_t).
Obviously, I just follow the convention when contributing to an existing project.
- pwdisswordfish 10y ago...values greater than 10?
- deleted 10y ago[deleted]
- cygx 10y agothis can lead to bugs with values greater than 2^sizeof(ssize_t) The range of indexable array elements is not only constrained by the unsigned type size_t, but also by the signed type ptrdiff_t, so you could always go with the latter instead of the non-ISO ssize_t.
- deleted 10y ago[deleted]