Your leader length is dependent on how you are fishing. I will be discussing subsurface fishing. If you are using a floating fly line then you need a longer (9') leader. This is to keep the fly line away from the fly and to get the fly deeper. Even when using weighted flies and/or shot you need to have some separation from the fly line.
If you are fishing a floating fly line with a sinking tip that is built into the fly line, or a Tenny T series line you need to shorten the leader. If you use too long of a leader the fly will not get as deep as the fly line. Of course a weighted fly will help that situation. The fly line with a built in sinking tip of about 10' is my favorite for Steelhead and Salmon in moving rivers. If you are fishing a deep pool at one end you may have to adjust your leader or fly line to accommodate the deeper water.
Some of the forum members like a floating fly line that they add a sinking section to the end of the fly line and then a leader to the sinking add on. This may work for lakes or deep pool fishing but they are a bear to cast. Not to say a sinking tip fly line is easy to cast.
The sinking section that you add to a floating fly line has loops on the ends and you now have a loop to the sinking section from the fly line, then another loop to fasten a leader to the end of the sinking section. This setup has too many loops for my liking.
So here is how I like to fish for Steelhead or Salmon in a moving river environment. The water won't be too deep and you need to stay in contact with the fly. I use Climax short tapered leaders designed for Steelhead or Bass. The Steelhead leader comes in a 4' length. I carry 0X and 1X sizes. With these two sizes I can use the 4' leader as is and that works in a lot of rivers. If I want to lengthen the 0X I can add some more 0X tippet material. Or I can tie on a 24" of 2X tippet and I now have a 6' 2X leader. If I want to go down to 4X, I can cut the 2X down to 10" and add a 24" piece of 4X. The same works with the 1X. I can use the 1x, or add some 3X. So these two basic leaders gives me the option of using a 0X, 1X, 2X, 3X or 4X. This covers the 4lb to 10lb range. With two ties I can go from 4' to 8' and that is all I ever needed fishing Alaska.
If you are going to be indicator fishing then a 9' leader is needed with a floating line. If you are using a sinking fly line of some type you need a 4' to 8' leader. The trick to leaders is to be aware of the conditions and adjust the leader to fit the situation.