Re: Re: Opinions / Votes Needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Per Jessen wrote:
Nathan Rixham wrote:

point is..
Java let's me easily do 70% of what I need to
PHP let's me easily do 95% of what I need to


I'm curious - can you list what the 25% are?

it lacks dynamic typing, the ability to procedural code and its precompiled not interpreted; all in a hello world in php is 10 seconds, in java it's nigh on 10 minutes. Hence why php is such a good language

If we could get that 5% added then PHP would be perfect, not only that
but me and the rest of the team at work would be able to make our
multi-million pound enterprise projects in PHP instead of java; as
would so many others (that can't be a bad thing for PHP)

But why?  Why not use Java and J2EE and all that good stuff?  I'm not
much of a java fan myself, but you've got to give credit where credit
is due.

well I can give two examples:
Three other PHP Developers and myself spent the best part of a year creating a large multi-site event management system in PHP; the whole process was deeply frustrating primarily due to the lack of optional static typing and there in the lack of a solid ORM; with this small addition the whole process would have been a 6 month process if that, and a far more pleasurable experience.

Currently 7 other Java developers and myself are building a large multisite transportation management and ticketing system in Java, this is a 9 month project with a decent sized and very skilled team; because of the lack of static typing (and thus the lack of development tools and frameworks/orms for PHP) we've had to go with Java; TBH the static typing is only needed on the domain model and the api layer, the bulk of the business logic in between where the majority of the work comes in, would be a great deal easier using a mix of procedural code and dynamic typing. I'd argue that again the development time of this project could be halfed if it was done in PHP AND if in PHP had support for optional static typing coupled with a good ORM. Further the difference between precompilation and interpretation is v noticable when it comes to rolling applications out, often in development you want to run a hlaf built or broken application to see what happens and check if parts x y and z are good + to test your infrastructure; when you can't compile and do this testing becuase the app isn't bug free or completed it's rather limiting. Sometimes unit tests just don't cover what you need.

Additionally, rather sure you'd see a mass influx of people moving to
php, and applications created for it - even down to design tools such
as reverse and forward engineering between uml and php.

ack.. there's a tonne of amazing tools and frameworks for java, and
I'm sure that a vast majority of them are possible because of this
static typing (from orms to web service frameworks and all in between)
- am I so bad for wanting that for php and my fellow devs?

No, you're not so bad :-) The point is - why not just use Java, when you really need the features?

the cases above should show why, fact is (imho) PHP would be a far better language than java for web based applications in 99% of cases if it had this optional static typing and the tools that allows. *IF* it did, then 10 other people and myself wouldn't have wasted a year of there lives on writing what could be unneeded code; I'm sure I'm not the only one in this position.

I've already quoted this, but in this context I feel it's appropriate to reiterate:

"Instead of providing programmers with a black or white choice between static or dynamic typing, we should instead strive for softer type systems. That is, static typing where possible, dynamic typing when needed. Unfortunately there is a discontinuity between contemporary statically typed and dynamically typed languages as well as a huge technical and cultural gap between the respective language communities."

"The problems surrounding hybrid statically and dynamically typed languages are largely not understood, and both camps often use arguments that cut no ice. We argue that there is no need to polarize the differences, and instead we should focus on leveraging the strengths of each side."

Regards!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux