On Saturday, April 25, 2015 at 11:44:09 AM UTC-5, Marcus Appelros wrote:
>
> julia> Cubes([1,2,3])
> 3-element Cubes{Int64,1}:
>  #undef
>  #undef
>  #undef
>

show() is trying to get the values in the array, but doesn't know that it 
can get them from Cubes.data. What you really want to be able to do is 
delegate everything to the .data member, but there's no convenient way to 
do that (there is also no convenient way to do that in C++, so it's not a 
new problem.)

Defining getindex() should be enough to get show() working. As Simon 
mentions, it would be good to define setindex!() as well so you can mutate 
the underlying array.

Reply via email to