The Evolution of Programming Paradigms: From Imperative to Functional and Beyond