Hacker News new | past | comments | ask | show | jobs | submit login

Slowly PHP is converging to what Java has been like 15 years ago.



What's really crazy to think about is how much flak Java took for YEARS upon YEARS from a rather non-trivial number of developers, managers, and media. It was ruthless at times. Looking back, it was pathetic. Now, all of a sudden, look at where we are. We're seeing all these not-Java languages looking more and more like Java, and conversely Java starting to impersonate the not-Javas. Weird. You have to give the team behind Java credit for pushing forward in spite of this. There's a real lesson to be learned here.


I don't understand why people say PHP is like Java. There's very little in common between the two. Because PHP has types? Lots of languages have types.

Why in the world are people comparing PHP and Java?


I think it's mostly because of PHP frameworks. From my experience with PHP (and, admittedly, not very much experience with Java), I got the impression that a lot of the PHP Framework developers read all the "state-of-the-art" Java literature on how you should build software and then they implemented that in PHP.

They just ignored the fact that Java is compiled which makes all the layers of abstraction less of an issue whereas PHP is interpreted at runtime* hence why there are few high traffic websites on PHP that don't have at least four layers of caching.

* Yes, I know this is getting better with every version, opcache getting a lot of attention in the last few minor releases and all that, but there is only so much optimization you can do with dozens and dozens of layers of factories and services. My guess is that it does a LOT more for "simple" software like WordPress and less for, say, Symfony based projects.


Except PHP already has some of the nicer features of Scala (like traits) and is more flexible (you can write Java-like code, but don't have to).


True.

I'm also seeing that with JavaScript and TypeScript.

TS feels very C# like.

Luckily there seem to be counter movements with languages like Reason, ClojureScript and PureScript.


We're basically getting a huge Algol mono-language.

C is not really moving, but C++ is also converging towards this Java++ language.

Java itself is finally moving.

C# is a bit ahead of the curve, because it can follow the trail blazed by F#.

PHP started moving towards Java back from when PHP5 was introduced.

Javascript is moving towards Typescript which is following C#'s lead.

Python is kind of the only non-Algol mainstream hold out.

Did I miss any of the big enterprise languages? :-?


How is Javascript moving towards Typescript?


I don't know either.

TS was influenced mainly by C# at the start, then from FlowType and currently it's mainly influenced by ECMAScript.

So to me it feels like the other way around.


How is Python non-Algol?


How is Python Algol-based or inspired? I've never seen anyone describing as such, did Guido ever say it was?


https://web.archive.org/web/20070501105422/http://www.amk.ca...

It's in the Algol family, mostly indirectly through ABC, Modula-2 and 3, C, ...

Per the interview, string slicing actually came directly from Algol-68 (and Icon).


plpgsql and similar?


SQL you mean? True, but that's more of a DSL. In the same vein you'd have HTML, CSS, but I was talking about general purpose programming languages.



> TS feels very C# like.

Probably because they were created by the same person!


And both supported by the same company!


It somewhat ends up in a best of both world scenario though. Java 15 years ago (in my opinion) was so strict and rigid and abstract interface jokes were writing themselves in real life. PHP was in a fairly dark (though very lively) place as well.

Here we get a pretty good deal, I guess time matters.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: