-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Future-proofing 0.3? #7774
Comments
Thank you for raising this. Are there other documents available regarding future changes we should be aware of? |
Thanks for raising this. Changing centers = X[:, iseeds]
... then update centers as using K-means ... What I am now doing as a safe guard is to do |
My concern is that adding A lot of such codes have been buried deep in current codebase and packages, people will virtually have to examine line by line to spot them. Also, I am not sure how many people will pay attention to I would say just change the behavior (if we decide to do so), announce loudly & broadly to notify people, and give them a period to fix all breakages (before we release 0.4). That being said, x[:, i] # make a copy in 0.3, return a view in 0.4
copy(x[:,i]) # make copies twice in 0.3, make the copy once in 0.4
getcopy(x, :, i) # always make exactly one copy (in both versions) |
How different will slices-as-views in 0.4 end up relative to what's available now in the ArrayViews package? If @lindahua's approach with |
I have a PR a few months ago to incorporate
|
That's basically my point. Is the package solution good enough for that bullet item then? (Oh and continued thanks to you, @timholy, and everyone else for writing awesome fast code that we can all make use of.) |
@lindahua, I agree that it won't fix the problem. At best it gives conscientious & aware package developers some mechanism to avoid code-breakages at an inconvenient time, and to avoid having to ask all their users to upgrade their packages if they have also upgraded julia. But it may not be worth introducing the extra name, unless we plan to keep it long-term. @tkelman, I think the problem is that once |
Yes, the change to views for |
Yesterday I had the idea --- unfortunately I didn't post it at that point --- that the next person to add something to the 0.3 milestone should have to buy everybody dinner. |
👍 |
Indian or Mexican? |
craigieonmain.com |
@timholy While |
+1 for Jiahao's suggestion. |
@tkelman, my suggestion applies for people who are not even using the ArrayViews package. Silly example:
This code will trigger an error as intended on 0.3 but silently proceed on 0.4. |
Boring. How about this one. |
FWIW, I think the best solution isn't to modify 0.3, but to make this change in the first few weeks after 0.3 is launched. That gives people a long period of time to get things to start working with views. |
Not a bad idea, especially if we don't really want |
I'm actually a little more concerned about the breakage from the second bullet item, but I suspect we're largely OK with
There's one problem, however: currently
So for writing generic code, maybe we should add a fallback |
I suspect (especially since my |
OK, I'll close this. Sorry about the dinner. |
My concern is that Julia was usable pretty much from the start for real work, so naturally people started using it. Unfortunately that kinda makes it feel bad to break peoples code, but I worry that'll limit what Julia 1.0 can be. I say: break everything, don't hold back. Maybe even do what Linux used to do with alternating releases? 0.3 is going to be pretty pleasant to use for quite a while (although if precompiled packages become a thing... it'll be hard to stick with 0.3 :D). |
Since 0.3 is so stable and a number of things are likely to break in 0.4, it may be worth the additional effort to do more maintenance of the 0.3 release branch than we have previously. |
Yes, I think so. I also think another effect of the long 0.3 release cycle has been to provide more time to think about what might go into 0.4, so I am all charged up to do lots of big changes. This makes me see the value of alternating stable/less-stable releases. |
…mat. ref #7893 - remove unnecessary extra serialization of length(x.names) - UTF16String and UTF32String now have compact type tags - don't serialize () for types with no parameters
With 0.3 around the corner, it belatedly occurred to me to wonder whether there's anything we should do to help users write code that won't break with some of the likely changes in 0.4. I'm not worried about error messages, but I am concerned about changes in behavior that result in bugs. On balance I'm not convinced that we should do anything, but I thought I'd share the thought and ask if anyone else can think of compelling examples.
Possible breaking changes:
b = a[2:n-1]
returns a view rather than a copy: will break code that assumesb
can be modified without affectinga
. Could be resolved by introducing into 0.3 something likeb = getcopy(a, 2:n-1)
. In 0.3getcopy
would just be an alias forgetindex
, but that could change tocopy(getindex(a, 2:n-1))
once the change is made.Uint8+Uint8->Uint8
rather than the currentUint
. This will cause overflows particularly in code that accumulates over multiple elements of an array. However, we already havewiden
, so I doubt this requires any changes to julia. EDIT: one way to test this hypothesis is to introducewiden
inreduce.jl
,reducedim.jl
and see what breaks.The text was updated successfully, but these errors were encountered: