Can a loosely typed language be considered true object oriented?
- by user61852
Can a loosely typed programming language like PHP be really considered object oriented?
I mean, the methods don't have returning types and method parameters has no declared type either.
Doesn't class design require methods to have a return type?
Don't methods signatures have specifically-typed parameters?
How can OOP techniques help you code in PHP if you always have to check the types of parameters received because the language doesn't enforce types?
Please, if I'm wrong, explain it to me.
When you design things using UML, then code classes in PHP with no return-typed methods and no-type parameters... Is the code really compliant with the UML design?
You spend time designing the architecture of your software, then the compiler doesn't force the programmer to follow your design while coding, letting he/she assign any object variable to any other variable with no "type-mismatch" warning.