It's a pretty shitty law, at least if they make a dumb law like that don't charge the kid with murder maybe tone it down to involuntary manslaughter? Not sure if the sentence is much lighter but either way that's a shit law.
Also put yourself in the cops situation. A kid with a gun turning in your direction. This isn't the movies people. Someone has a gun that can go bang that can kill you. Shooting handguns really isn't the easiest thing to do in the world accurately. If someone with a gun turns in my direction I won't wait to get a last second drop that fucker is going down.
You rob someone with a deadly weapon whether it be a gun, knife, bow or shark with a laser beam you forfeight your right to live.