.40 comes in two different lengths?
Not exactly. :>)
There was the 10mm, but its recoil was deemed excessive in terms of training for the average FBI agent and police officer competency of use and qualification. so the FBI downloaded it to 10mm Lite. With the Lite loading the case was now excessively long, longer than it needed to be, so Smith & Wesson and Winchester collaborated and figured out they could now shorten the case while duplicating the 10mm Lite loading and make it fit into a smaller, 9mm platform. Thus, the 10mm Lite became the .40S&W.
(After this, SIG-Sauer and Federal Ammunition collaborated and necked the .40 S&W down to accept a 9mm bullet, thus the .357 Sig was born).
So yes, there "kind of" is a .40 Long, the 10mm.