News for hackers. Stuff that matters.
Re:Show HN: PHP does Meta Programming too by larve on Wednesday August 31, 2011 @08:01AM (#2945172)
coming from a lisp background, and now working on a 'mid-sized' php CMS, i've been pretty happy with the reflection and other features (dunno if they are 5.3 or not) like closures to build something which has around methods, reflectioning on the docstrings to generate a REST api, etc...

good fun indeed, you still have to be aware of a lot of php quirks though to make your code secure.

Re:Show HN: PHP does Meta Programming too by troels on Wednesday August 31, 2011 @08:40AM (#2945258)
Closures are new in 5.4, but the reflection api has been there since 5. Indeed, PHP may not be pretty, but it's really good at hacking stuff together that just works. A lot like shell scripting, although much more maintainable.

My biggest beef with PHP is that there is such a chasm between the procedural style at the object oriented one. This is mostly caused by PHP adopting a static class model (a really odd choice for an otherwise highly dynamic language). On the plus side, this tends to cause fewer surprises than you see in languages with a more dynamic object model.

Re:Show HN: PHP does Meta Programming too by nolok on Wednesday August 31, 2011 @09:08AM (#2945350)
Closures came with 5.3
Re:Show HN: PHP does Meta Programming too by troels on Wednesday August 31, 2011 @09:09AM (#2945354)
Sorry, you're quite right.