I don't know why, but just by reading the title my mind implied JavaScript, and I noticed it doesn't have that word only after reading your comment.
Weird.
I thought of C++, but I have never written any JavaScript in my life. It's worth considering that even in C++, there are times when inventing a class to simply perform a function is excessive.