Page 2 of 2

Re: Future of PHP

Posted: Tue Jan 10, 2012 3:15 am
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!

Re: Future of PHP

Posted: Tue Jan 10, 2012 5:41 am
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

Re: Future of PHP

Posted: Sat Jan 14, 2012 2:13 pm
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.)

Re: Future of PHP

Posted: Mon Jan 16, 2012 7:51 am
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 ;)