My favorites | Sign in
Project Logo
                
Code license: Apache License 2.0
Labels: scala, staticchecking
Feeds:
People details
Project owners:
  david.maciver

This is a simple library for providing types which ensure that an array access is never out of bounds.

Essentially it works by creating a Range object and having an Index type scoped to that object. CheckedArrays and similar are also scoped to that object, and the compiler enforces that if an Index is used on a CheckedArray then they come from the same Range.

Of course, there's no performance advantage to this as the jvm checks the array access anyway, but at least you're writing safe code. :-)









Hosted by Google Code