4 ms·
PHP has changed a lot over time. It moved from a C-style procedural language to very Java-esque object oriented language. "PHP" hasn't been "PHP" for a long tim
by nikic 14y ago
PHP has changed a lot over time. It moved from a C-style procedural language to very Java-esque object oriented language. "PHP" hasn't been "PHP" for a long time already.
It's always hard to do large language changes, but it's not impossible. E.g. consider the change that PHP did from version 4 to 5. That was a pretty major paradigm shift, with lots of broken code, but it worked out well in the end :)
- 10098 14y ago> It moved from a C-style procedural language to very Java-esque object oriented language The funny part is, it did not make things better.
- cies 14y agoTo me the OO features of PHP have always felt 'bolted on', yet Java is OO from-head-to-toes. It only emphasizes my point: unlike a startup, a programming language cannot pick/change vision when it is a grown-up.
- objectified 14y agoProbably because they were in fact "bolted on". Saying that Java is OO from head to toes, I can't agree with. Java has primitive types as well, and not everything is a first class object (like methods). Python is more OO in that sense, for example. In a sense, Java is having trouble incorporating modern features in the language too. Just take a look at how generics are implemented, and the endless closure debate.
- cies 14y agoPython? Try to subclass an int in Python, and see that it is not as OO as you think. Ruby is more OO then Java for the reason you give, still there are primitives but they have a thick OO-coating so you are less likely to notice they are 'different'. Try subclassing a Fixnum -- it works! But Fixnums have no 'new'.
- VMG 14y ago> PHP has changed a lot over time. Mostly in the way that stuff was added.