It took a while to get it right in cricket, and while there are still murmurings about the system, it's largely accepted that DRS has improved the game.
However, you would think football would learn from a sport that has successfully implemented replays, and introduce a degree of error. For example, this:
...would be given not out, even though technology states that the umpire is wrong.
You would hope that football rule-makers would understand that you can't have decisions being blanket overturned because a player is shown to be 1mm offside. But with the handball rule in Europe already being farcical, I suppose it's no surprise that it isn't being implemented in a sensible fashion.
I suppose, technically, Sterling was very marginally offside, so it's a fair decision, but it doesn't seem to be in the spirit of why technology has been introduced or considered necessary.