-
Notifications
You must be signed in to change notification settings - Fork 147
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
Proposal: Accessing Vector{SVector} with [:, n] #558
Comments
In theory, it would be nice to use broadcasting. There are competing (and compelling) proposals for the But I’d rather follow the |
That would be type-piracy (it probably wouldn't be very breaking here since it only makes code that used to error, not error) but still. |
Why? Edit: if what you said was the case, then noone would be able to extend |
|
@Datseris "Type piracy" is a phrase we use to imply something more specific (and potentially dangerous). The problem with this kind of change is that much generic code is written to rely on particular interfaces guaranteed by A change like this one is not friendly to "blind composition" of generic code. We've discovered over time that one of Julia's main strengths is the ability to perform blind composition, so the community is rather protective against anything that threatens this. I do agree that concise syntax for this would be useful, which is why I mentioned bringing it up on the Julia repo instead (which obviously can't endanger blind composition since we all rely on |
Not only is it breaking the |
Well, sure, yes, that makes it slightly worse. It comes in degrees, though; |
@Datseris, you can create a package that supports custom index types, e.g., |
Would you accept accessing Vector{SVector} with [:, n] , as in
with
data <: Vector{SVector}
? I am sure many people use this all the time, would be nice to have the shortcut.The text was updated successfully, but these errors were encountered: