[UPHPU] Java and Frameworks

David Smith DavidSmith at byu.net
Thu Nov 11 10:25:24 MST 2004

<quote who="Jeff Moss">
> Doesn't the newest revision of Java let you load up or "use" a namespace
> like C# does? That could potentially make it more usable (and less
> readable). I am not a Java guru but I remember reading that somewhere.

Yes, it does, though they are not called namespaces.

> IMO Java is just more strict, more evolved version of PHP.

Java uses static type-checking by design. PHP uses dynamic type checking,
also by design. I totally disagree that Java is an evolved version of PHP
or that it even is remotely inspired by it. Java was written with totally
different goals in mind. PHP is just a YASL (Yet Another Scripting
Language) that just happens to have lots of good functions for use on the
web, and a clean C-style syntax. In my view, if Perl had more intuitive
syntax, PHP would have never come to be.

> PHP is going the same direction as Java recently, which is a shame.

I disagree. They are fundamentally different languages. How is PHP
following Java?

> I'd like to see it become more dynamic.

I agree. Though I am a fan of hard-core Java-style static type checking
(to cover my butt), I like the fact that dynamic languages give you
polymorphism for free, and don't require the extra planning and thought
that strict static languages require.

> I think one very significant reason to use Java is that you hide your
> code in jar files. I know you can obfuscate PHP code too, but I get the
> feeling that PHP has more "open source" fuel behind it, where Java looks
> more appealing to someone who wants to sell their code.

Commercial PHP applications are rare. OSS Java applications are rare. I
think this is more a function of the organization behind the languages
than any characteristic of the language itself. Java, being commercial,
tends to encourage commercial development. PHP, being OSS, tends to
encourage open source development. Also, most people use PHP for one-off
sites. Most PHP code was not meant to be distributed.


More information about the UPHPU mailing list