C++ at() doesn't check and abort, it checks and throws a specific documented exception that you can catch. So it is, in fact, closer to get(), just using a very inefficient way of reporting.
> C++ at() doesn't check and abort, it checks and throws a specific documented exception that you can catch. So it is, in fact, closer to get(), just using a very inefficient way of reporting.
You can catch a panic, and you can compile C++ with -fno-exception. at() is not closer to get() than to [].
On real world where code portability actually matters, many do program against ISO C++, and have to deal with workarounds for lack of compliance.
Not doing so means ending up with situations like the Linux kernel, Windows or console games, which might be ok, when code portability doesn't matter to start with.
You can catch a panic, and you can compile C++ with -fno-exception. at() is not closer to get() than to [].