Dispatch in v10

Hello,
First post here, so maybe it’s in the wrong topic. But, I’ve encountered a problem in Mathematica v10 that I didn’t had in v9. The result of the Dispatch command seems to be altered between the 2 programs. See the 2 attached files.
This is creating a mess (read errors) in my programs and packages I have created. It would be nice to good if such differences were pointed out (like the Update flag in the documentation, for example the Part function) so we (the users) can debug and update our programs. Especially when commands of the previous kernel are changed.

<“v9 example”>

<“v10 example”>

In this particular case the Normal function might be useful. This is for MMA10

rules = {a -> b, b -> c, c -> a, d -> e, e -> d}

Normal[Dispatch[rules]]

This is the output:

A similar change has happened to many functions, for example NDSolve.

Cheers,

Marco

2 Likes

Dispatch is now atomic in version 10.

You could define a function for converting a Dispatch object to rules like this:

If[$VersionNumber < 10,
 dispatchRules[d_Dispatch] := First[d],
 dispatchRules[d_Dispatch] := Normal[d]
]

Then use it in your packages.

2 Likes

Thanks for the replies. Too bad I need to spend time update packages and programs…