title: Creating views of user types in julia
body: <p>The new julia 0.5 has improved support for views of arrays. Is it possible to use this functionality to allow views of custom types? E.g. so I could</p>
  
  <pre><code>immutable test
      a::Vector{Int}
      b::Vector{Int}
  end
  </code></pre>
  
  <p>then define a <code>getview</code>function that would e.g. give me a view of <code>test</code> like <code>test(view(a,1:3), view(b,1:3)</code> when passed 1:3 as the argument? (Just doing this creates a new test object where a and b are copies of the subarrays, which is not what I want).
  Thanks!</p>