Fix what I assume to be a typo.

This commit is contained in:
moloughlin 2015-05-08 22:01:01 +09:30
parent f7ff2fc454
commit fcc73afa84
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ var heterogeneousArray: seq[ParentObjectType] = @[]
# TODO: Add an object inheriting from ParentObjectType to the seq # TODO: Add an object inheriting from ParentObjectType to the seq
``` ```
That will return a compilation error, because the objects have different sizes. Like in C, you can't make an array of structs with disparate types and sizes. What one can do is an array of references to the objects, all references having the same size put pointing to heterogeneous objects. This is what Python does by default. That will return a compilation error, because the objects have different sizes. Like in C, you can't make an array of structs with disparate types and sizes. What one can do is an array of references to the objects, all references having the same size but pointing to heterogeneous objects. This is what Python does by default.
``` Nim ``` Nim
# TODO: Show the proper way to do things, with emphasis on what changed # TODO: Show the proper way to do things, with emphasis on what changed