3 ms·
get_foobar() could update some thread_local static value, for example.... or print something to screen. n_bytes could easily be negative if a byte offset, or a
by cozzyd 3y ago
get_foobar() could update some thread_local static value, for example.... or print something to screen.
n_bytes could easily be negative if a byte offset, or as a sentinel.
This is why we have a type system, to express these things :)
- bjourne 3y agoNah, those are type errors. Some languages use case so that FOO can never have the same type as foo. Nothing prevents a type system from similarly distinguishing between get_foo() and set_foo().