Recipes for pralines, for fudge, even for hot cocoa say to add vanilla extract only after removing the dish from the heat.
- Does that apply to artificial vanilla extract also?
Liquid vanilla extract has alcohol in it, so if you add this extract to hot cocoa, puddings, fudge, or anything you make with heat, the alcohol burns off and so does most of the flavor. If you wait for it to cool off the flavor stays strong. Same thing goes for artificial vanilla also because of the alcohol levels (but the flavor is just not there to begin with with artificial flavor). If you use vanilla beans, open up the pod and scrape the inside of it and put it in the beginning with the hot mix. That is another story. It is very delicious, but you see teeny tiny little beans swimming in your lighter mixes like vanilla bean ice cream.
I have a bottle of imitation vanilla extract that's water based. I know from experience that adding it to a hot liquid results in a strong imitation vanilla scent being released into the air, which means less imitation vanilla flavor is staying in the liquid. I think it's safe to say that it wouldn't evaporate nearly as quickly as an alcohol based extract, but it's still not immune to heat.
There are (more-or-less) three kinds of 'vanilla' you can buy today: real beans, 'natural' extract and 'synthetic' vanillin. (The synthetic version can be sold either as a liquid extract, or as a powder, e.g. vanilla sugar.)
Synthetic vanillin is these days made from guiacol, that can in turn come from many sources, including crude oil. (You will see online claims that it's made from 'castoreum' which comes from beaver butts, but that's pretty unlikely, considering how much cheaper it is to use the fully synthetic version.) (Synthetic vanillin used to be made from lignin, i.e. wood pulp, but that has apparently been phased out.)
Vanillin is the chemical that gives the main 'vanilla' note to vanilla, and the synthetic version is identical to the natural one. However, in real vanilla beans there are also hundreds of other chemicals that provide further flavour.
That said, it's not always true that 'natural' vanilla is better. Quoting from 'Eight Flavours' by Sarah Lohman, which has a very informative chapter on vanilla:
But I believe there is a time and place to use every version of vanilla in your kitchen: bean, natural extract, and imitation extract. I was first introduced to the potential of imitation vanilla extract in Cook’s Country magazine, beloved for its thorough taste tests of everyday ingredients. They tested natural vanilla extracts against imitation extracts in blind taste tests, adding them to puddings, cakes, and cookies. Each of these three vanilla-heavy dishes cook at different temperatures: low, medium, and high heats, respectively. Although cakes and cookies bake at the same temperature, around 350 degrees, cakes reach internal temperatures of only around 210 degrees. But cookies, which are small and thin, will exceed temperatures of 280 to 300 degrees. At high heats, all the hundreds of wonderful flavor chemicals of natural vanilla burn off. The result is that your vanilla sugar cookies, baked with natural vanilla extract, end up virtually tasteless. But imitation vanilla, which contains pure vanillin, delivers a much more potent dose of flavor that survives the oven’s heat. While real vanilla extract won the low-heat competition for pudding, it tied with an imitation extract for cakes, and lost the cookie battle.
Skeptical? Well, I decided to do an informal taste test of my own. A year before I set foot on Norma’s plantation, I gave a lecture on artificial and natural flavors. There were more than a hundred people in attendance. I had baked two batches of snickerdoodle cookies, using identical ingredients except for the vanilla: one had high-quality, expensive, natural vanilla; the other, cheap-as-dirt imitation. The taste test was double-blind—the cookies were labeled so that neither the participants nor I knew which cookies were which when they were distributed. The crowd voted on their favorite. The imitation vanilla cookies won 2 to 1.
Ms Lohman keeps all three variants at home: whole beans, 'natural' extract and 'synthetic' extract. Some food, cooked at really low temperatures, such as crème brûlée doesn't work well with extract, as the alcohol won't boil off, leaving a boozy flavour. For these, use real beans.
For cookies that will be baked at high temperatures, on the other hand, the richer flavours of real vanilla will be ruined (and can apparently turn nasty), and artificial vanilla with its pure vanillin is better.
For everything in between, 'natural' vanilla extract is probably preferable.
As @user33210 said, vanilla extract is prepared with alcohol, so adding it early to the cooking process allows a lot of the alcohol to evaporate, consequently the vanilla aromatics as well. However, if you use vanilla beans instead you won't have this problem but instead end up getting a better vanilla smell in your dish.