Also, objects are best when used to represent actual objects (i.e. collections of data rather than collections of functions).
This is OK
User user = new User("John");
But this: StringTokenizer st = new StringTokenizer(str, ",");
while (st.hasMoreElements()) {
System.out.println(st.nextElement());
}
Might not be as clean as: stdout(tokenize(str, ",")); // functions are hypotheticalas you said, nowadays people are using String.split ``` List.of(str.split(",")) `` which is less poetic.
Except these aren't objects, they're just records. I don't think it's a good idea to pollute the word "object" or OOP. You use objects specifically when you need procedural abstraction, otherwise you use other types of values, like products/records, sums/variants, etc.
At high system levels, where you have client/server or other types of protocols, objects fit. At lower levels other paradigms tend to be better.
This reminds me of a certain blog post about Java flavored OOP[1]
[1] https://steve-yegge.blogspot.com/2006/03/execution-in-kingdo...
"I invented the term object-oriented, and I can tell you that C++ wasn't what I had in mind." - Alan Kay, Source: https://youtube.com/watch?v=oKg1hTOQXoY&t=634s
And the world has moved on. OOP is not about message passing.