Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some {T}s from type definitions #17

Closed
wants to merge 1 commit into from
Closed

Remove some {T}s from type definitions #17

wants to merge 1 commit into from

Conversation

andreasnoack
Copy link
Member

@lindahua These {T}s have actually just been ignored by Julia until today's push of the call overload branch.

@ivarne
Copy link

ivarne commented Oct 24, 2014

Couldn't this rather be written as

immutable ContiguousView{T,N} <: ArrayView{T,N,N}
     arr::Array{T}
...

or is there a subtle difference between the two expressions?

@andreasnoack
Copy link
Member Author

I don't think so, because Array{T} is not concrete so I think you'd get a less efficient solution. You couldn't do Array{T,N} either, because

julia> view(randn(4,4), :, 1)
4-element ContiguousView{Float64,1,Array{Float64,2}}:
  0.621978
  1.14273 
 -0.30176 
 -0.378925

@ivarne
Copy link

ivarne commented Oct 24, 2014

Thanks! It makes sense when you say it. It's way to easy to forget that Array{T} is abstract.

@Keno
Copy link
Contributor

Keno commented Oct 27, 2014

bump

@lindahua
Copy link
Contributor

Already done in 3346c76.

@lindahua lindahua closed this Oct 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants