15 ms·
Even though I agree with point 1, 2 and 4, I'm not with you on point 3. Why take OO to an extreme when there is no technical nor functional reason to do so? The
by st0p 16y ago
Even though I agree with point 1, 2 and 4, I'm not with you on point 3. Why take OO to an extreme when there is no technical nor functional reason to do so? The best example is Math.Sin(x) vs. Sin(x)... There is no valid reason (IMHO) to go for the Math.Sin() approach in PHP. It doesn't add anything, except more keystrokes.
Of course if your language is entirely OO (like C# or Java), you can't avoid constructs like Math.Sin(). Even though I prefer C# and Java above PHP, it has always annoyed me that I needed to prefix those kind of functions with a class name. I understand that it is a trade off in language design and forcing you to think in objects is mostly a good thing (if you leave functional programming out of the equation). However, if your language supports functions outside of objects, why not use them?
[disclaimer]I didn't look at the actual code, so I'm not sure if there are functions that indeed should have been (static) members of a class.[/disclaimer]