Future of PHP

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Re: Future of PHP

Post by Mordred »

Also, not knowing things doesn't mean you wouldn't benefit if the things were better ;)

But yeah, since I learned Lua, I've yet to try a high-level language that doesn't annoy me for 'not being like Lua'. I'm looking at you, Python!
User avatar
twinedev
Forum Regular
Posts: 984
Joined: Tue Sep 28, 2010 11:41 am
Location: Columbus, Ohio

Re: Future of PHP

Post by twinedev »

Mordred wrote:No stupid $ marking of variables. If it's not a reserved work or a defined constant, it's a bloody variable.
I like the $'s, I sure don't see enough of them in my bank account, so at least I get to see them elsewhere LOL

-Greg
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Re: Future of PHP

Post by Eric! »

Mordred wrote:since I learned Lua, I've yet to try a high-level language that doesn't annoy me for 'not being like Lua'
So after looking into Lua, I found myself wondering why I've never heard of it before.... I like the looks of it on the surface. By the way, I see it has popped up in world-wide usage according to TIOBE and php has dropped to #6. But then ADA and LOGO, WTF?

(By the way when I said remove the non oop as a question, I meant did you want to take out the php's ability to write procedural code. Procedural code really raises hackles on a lot of people.)
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Re: Future of PHP

Post by Mordred »

Best features of Lua (according to me):
- coroutines (easily turned into cooperative multitasking "soft" threads)
- tables as universal containers: arrays, hash tables, objects rolled in one structure. EVERYTHING can be a table key (unlike Python)
- optional OOP and functional programming styles. You can build your own OOP model over metatables (prefer multiple inheritance? you can implement it yourself in a screen of code)

Stuff I dislike: 1-based indexing by default, no "continue" statement, a somewhat unpleasant C-side API.
---------

No, I think PHP's optional OOP is good (but I come from a C++ background, so it's like my "mother tongue"). Using OOP for the sake of using OOP is just hipsterish elitism. You use OOP when you bloody need it, that's what I think ;)
Post Reply