Preheat oven to 350 degrees F (175 degrees C).
Grease and flour an 8x8 or 9x9 inch baking pan.
In a medium bowl, beat together the butter and sugar.
Add eggs and mix well.
Combine the flour, cocoa and salt.
Stir into the sugar mixture.
Mix in the vanilla and stir in walnuts, if desired.
Spread evenly into the prepared pan.
Bake for 25 - 30 mins in the preheated oven or until edges are firm.
Cool, before cutting into squares.