In a saucepan, combine sugar, flour, and salt. Gradually stir in milk. Cook over medium heat, stirring constantly, until the mixture is thickened and bubbly.
Reduce heat and cook for 2 more minutes. Remove from heat.
Stir a small amount of the hot mixture into the beaten egg yolks, then return all to the saucepan. Cook and stir for 2 more minutes. Remove from heat and stir in butter and vanilla.
Layer half of the banana slices and half of the wafers in a baking dish. Pour half of the pudding mixture over the bananas and wafers. Repeat layers.
Cover and refrigerate for at least 1 hour before serving.
Notes:
For a lighter version, you can use low-fat milk and reduce the sugar.