Can a loosely typed language be considered true object oriented?

Posted by user61852 on Programmers See other posts from Programmers or by user61852
Published on 2012-08-21T02:26:24Z Indexed on 2013/06/28 22:28 UTC
Read the original article Hit count: 436

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.

© Programmers or respective owner

Related posts about php

Related posts about object-oriented