I fire 40 S&W through the 10mm barrel. It feeds just fine in the 10mm magazine. If I planned on shooting a LOT of 40 ammo then it would probably be advisable to get the 40 barrel. I would assume the 357 Sig would work just as well, but no personal experience.
I started out shooting .40 ammo in my 10mm barrel, worked great. Liked the .40 so much in the 10mm guns that I bought KKM .40 conversion barrels for the G-20 and a G-29. No problems.
For a while I ran .40 handloads (less than max) in my G-20 with a 20 pound recoil spring on a steel rod, ran great, shot great, soft recoil.
Been there, done that very that ... G20 and a G29. Aftermarket barrels, but same factory 10mm magazines and same factory 10mm recoil assembly.
In theory, it would/should also work in the longslide G40 MOS, if some aftermarket vendor actually made 6.2" tubes chambered in these other 10mm-derivative cartridges.
The easy barrel-swapping capability of the Glock 10mms - with nothing else needed - gives you a 4-caliber autoloader: 10mm, .40S&W, .357Sig, and 9x25 Dillon.
Just pick your favorite 10mm Glock and be done with it.