In a saucepan, combine the sugar, flour, and salt. Add milk in gradually while stirring gently. Cook over medium heat, stirring constantly, until the mixture is bubbly. Keep stirring and cook for about 2 more minutes, and then remove from the burner.
Stir a small quantity of the hot mixture into the beaten egg yolks, and immediately add egg yolk mixture to the rest of the hot mixture. Cook for 2 more minutes; remember to keep stirring. Remove the mixture from the stove, and add butter and vanilla. Stir until the whole thing has a smooth consistency.
Slice bananas into the cooled baked pastry shell. Top with pudding mixture.
Bake at 350 degrees F (175 degrees C) for 12 to 15 minutes. Chill for an hour.
Replacing all-purpose flour with cornstarch alters the set of the custard entirely, yielding a glossier finish that holds its slice cleanly instead of weeping under the bananas. Creating a reliable stovetop custard requires whisking milk slowly into the dry ingredients to prevent lump formation, then maintaining medium heat until large bubbles break the surface. Tempering the egg yolks demands immediate incorporation and continuous motion to avoid premature scrambling when introduced to the hot dairy base. Starch molecules must reach a full boil to gelatinize properly, neutralizing the amylase enzymes present in egg yolks that otherwise break down the protein matrix. Baking the assembled pie at 350 degrees Fahrenheit for 12 to 15 minutes sets the pastry further before chilling forces the starches to firm up completely. Slicing fruit directly into the baked pastry shell just prior to pouring the warm pudding maximizes moisture control, keeping the crust crisp. Storing the finished dessert improperly leads to rubbery skins forming on the pudding surface or soggy pastry bases from unshielded fruit condensation.