Scylla and Charybdis. But if forced to choose I would probably agree.
I'd choose Python over either and I really don't like Python.
| [reply] [Watch: Dir/Any] |
PHP to Java
What an interesting comparison - to me at least...
In my very limited understanding, PHP is pretty much universally used server-side for producing web pages. Java is mainly used for applications. (Does anyone still use JSP and Applets?) So in that sense, they are not even comparable. It would be very tricky to replicate the function of one with the other.
If I had to chose between them I would opt for Java as I do know a little. I had to take a Java programming module at university but it was pretty simple stuff. I have also created a few basic Android apps using Java. Whereas PHP I know nothing about other than looking at some code a few times and instinctively not liking what I saw.
| [reply] [Watch: Dir/Any] |
Any Turing complete language can replace another, and they’re all Turing complete. People don’t really use PHP for purely backend stuff but not because it can’t do it. PHP isn’t executed in the browser so it’s always “backend” really, just like Perl (no offense haukex, :P). PHP is quite similar to Perl, it just has a boatload of caveats and redundant functions. And Perl can be used exactly as PHP (Mason and Embperl). The only advantage PHP ever had, and the reason it ate Perl’s web lunch, was they built a deployment plugin for apache that was better for shared hosting than mod_perl (which was as bad as it gets for shared hosting).
| [reply] [Watch: Dir/Any] |
The clichéd example is, of course, the well-known exercise
of getting a language to print "Hello World". In Java, that's:
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
It's a cheap shot to point out how syntactically
overburdened that is, but it does illustrate a far more
important point: that it's *cognitively* over-burdened too...
-- Damian Conway in Builder AU interview (cited at The Lighter Side of Perl Culture (Part IV): Golf)
No, really, I don't want an identification division.
The problem with identification division is it really puts a crimp
in Perl's poetry, or in Cobalt poetry. How many poems can you
start off identification division? One.
-- Larry Wall in
State of the Onion 2000
Bod, as alluded to by the quotes above,
when I scored a Java job during the early Internet boom years, its verbosity
and enforced structure somehow spookily reminded me of Cobol, which I'd used in my first government job.
Though I much preferred Java to Cobol, both languages somehow made me feel oppressed ...
so I felt relieved when I was able to escape to the fresh open fields of C++ and Perl.
Oh, and I think your instincts regarding PHP are spot on. :)
| [reply] [Watch: Dir/Any] [d/l] |
Does anyone still use JSP and Applets?
Unfortunately, yes. There is an absolutely shocking amount of Java still used (and still being written!) for web applications and middleware despite it being entirely unsuitable for the purpose. Thankfully applets have pretty much gone as a direct result of browsers making it difficult for average users to enable that functionality. But the back-end stuff inexplicably remains.
The theory is that the massive push of Java as the teaching language of choice in academia from the late 90s onwards has produced a generation of coders who view it as ubiquitous. There were taught how to do everything in Java but apparently never taught whether or not they should. The result is massive, resource-hungry, slow, brittle, insecure web applications which would have been so much better written in almost anything else (even PHP). Java is no doubt great for writing mobile apps for Android but that's about it.
| [reply] [Watch: Dir/Any] |
| [reply] [Watch: Dir/Any] |