1. A computer program product comprising one or more computer-readable storage memory having thereon computer-executable instructions that, when executed by one or more processors of a computing system, cause the computing system to perform a method for declaring a type that can have a structured permission, the method comprising: representing a type as an object graph, the object graph comprising a plurality of nodes, the object graph supporting structured permissions, the structured permissions comprising a plurality of distinct permissions including a fresh permission, a fresh shallow permission, a deep permission, a root permission, and an inner permission; defining a first permission partition within the type, the first permission partition comprising a first set of one or more nodes within the plurality of nodes of the object graph; defining a second permission partition within the type, the second permission partition comprising a second, distinct, set of one or more nodes within the plurality of nodes of the object graph; assigning a first permission to the first permission partition of the object graph so that the first permission is enforced on access requests for objects within the first permission partition, and the first permission representing that there are no external references to a root permission partition referenced by a return reference; and providing an instantiation component which assigns permissions to each permission partition, so that the permissions assigned to the first and second permission partitions of the type are independent and instantiations of the type can have a different permission for the second permission partition than the first permission partition.