but I have existing code with many of instances of “__”, and all but
this one seem to work on all my standard tests. I would like to
understand if any others are likely to fail in Mathematica 10 in other circumstances.
Thanks for any clarification.
As an atomic object, MatchQ[1/2, HoldPattern[Rational[__]] and MatchQ[1/2,Rational[a_,b_]] never really should have worked. Compare, for exampe, with these examples:
The fact that they did was a quirk of implementation, which changed to a more efficient data structure in V10. Because of how common Rational[_,_] is, we continued to support by a special hook, but arbitrary patterns inside of Rational are unlikely to work. (BTW, the same thing happened with Complex in V9).
Fortunately, it should only be Rational is affected. MatchQ[tMax/2,HoldPattern[Times][Rational[n1_,n2_], b_]] and MatchQ[tMax/2,HoldPattern[Times][a_Rational, b_]] are both good replacedments that will continue to work. Notice also these don’t require an inner HoldPattern as the Rational involved won’t even try to evaluate.
Moreover, to retain backward compatibility, this was treated as a bug and so in the next release the behavior will revert to what it was prior to version 10.