DifferentialEquations.jl v4.0.0 Incoming Breaking Changes

The v4.0.0 release blog post lists all of the breaking changes. We are now no longer the only largely used package that breaks Julia’s “mutation first” convention! Also, parameters are always explicit. That and now the API is consistent across the domains. While this is a very rough change to handle, we hope everyone will appreciate it in the long run.



Why did you decide to break with the Julia convention of f! for mutating functions? At least it seems like you did from the description of the breaking changes…

I think you missunderstod. Now they will respect this convention.

No, mutation is in the front. That’s the Julia convention.

Do you mean the function name? You can name a function however you want. The way the function is called internally has no bearing on how the user names things. In fact, I would expect most users to (continue) to name there function with !. On the other hand, changing argument ordering is a massively breaking (un-deprecatable) change, and all users have to follow our API for the argument order. This change is all that’s required to allow users to name their functions with a ! and fully follow the convention.

This kind of naming choice though is purely a documentation thing and requires no deprecation or code renaming. So we probably do want to go back here:


and change the naming of that function to lorenz!, but that has no bearing on actual usage. And going around and adding some ! to the docs wouldn’t require anyone to update or error, so making the documentation clearer and more concise can be an on-going project.

One other thing to note is that we have a single type for the integrators and so we have to choose a single integrator.f name, and it just makes more sense to do that with the ! since we support both cases and naming with ! can have parsing issues (example: keyword arguments). But with .-overloading, we can definitely alias integrator.f! to mean the same thing as integrator.f so the user can choose this more appropriate naming when necessary.

Clarification: I mean to attach the bang to the name of the mutating function name.

The changes are now live. When you update, you will get the version with the new syntax.