The barrels used in the Gen3 and Gen4 Glocks (excepting subcompacts, like the G27/G27/G33?) are machined slightly differently, so I would say no, they are probably not interchangeable. This is due to the different diameter of the new dual-spring recoil spring assembly on the Gen4 guns. The little half-moon-shaped cutout in the barrel lug is slightly different (larger on Gen4 guns), and there may be other differences as well. The larger recoil spring assembly is also the reason for some changes in the front area of the Glock frame, too.
I do not know of any reliable source claiming interchangeability between Gen3 and Gen4 Glocks barrels for any model, although it is possible that this is the case for the subcompact guns (they have always had the larger-diameter dual-spring assembly). The Glock technical department would probably be the best source for this type of info, and if you call the Glock general information telephone number and ask for a Glock technician, they will usually connect you and you can ask a few questions.
"Placement is power" -- seen in an article by Stephen A. Camp
(RIP, Mr. Camp; you will be remembered, and missed)