Preheat your oven to 350°F (175°C) and grease a 9x13-inch baking pan or line it with parchment paper for easy removal.
In a medium bowl, combine the rolled oats, flour, baking soda, cinnamon, and salt. Mix well and set aside.
In a large bowl, cream together the softened butter, brown sugar, and granulated sugar until light and fluffy.
Beat in the eggs one at a time, then stir in the vanilla extract.
Gradually add the dry ingredients to the wet ingredients, mixing until just combined.
Fold in the raisins and walnuts (if using) until evenly distributed.
Spread the mixture evenly into the prepared baking pan and smooth the top with a spatula.
Bake for 25-30 minutes, or until the edges are golden brown and a toothpick inserted in the center comes out clean.
Allow the bars to cool in the pan for about 10 minutes before transferring them to a wire rack to cool completely.
Once cooled, cut into squares or bars and serve.