On 2/23/2015 4:13 PM, bearophile wrote:
5. bounds checking

When you go past bounds of a built-in array you get an error located in the user
code, while if you put a pre-condition in your Array struct to detect the same
errors, you get a run-time error message located in that pre-condition instead.
I'd like some way to solve this small problem of giving more correctly located
error messages. In Contract programming lingo it's a problem of "blame
management" (I'd also like a way to detect some compile-time out-of-bound errors
for user-defined collections, but you said this is not worth the effort).

This is off-topic. The point of the array class as presented is to show how a memory safe reference counted container can be built.

Reply via email to