No, this is not the same as the linked library. See here: http://stackoverflow.com/questions/6425165/statically-decide...
A similar example in Scala would be a class that has only 'val' types and no 'var' types, but read through the stackoverflow post to see the complexities.