News for hackers. Stuff that matters.
Re:PHP finally gets finally by ExpiredLink on Monday August 13, 2012 @12:14PM (#4376575)
PHP has no destructors?
Re:PHP finally gets finally by pixelbath on Monday August 13, 2012 @12:37PM (#4376703)
How did you get that information from this post? PHP has had destructors in some form since 4.x, and true class destructors in 5.x: http://php.net/manual/en/language.oop5.decon.php
Re:PHP finally gets finally by meritt on Monday August 13, 2012 @12:43PM (#4376727)
My guess is he's from the C++ camp who tend to always suggest RAII as a replacement for 'finally' and RAII relies upon destructors.
Re:PHP finally gets finally by chc on Monday August 13, 2012 @01:22PM (#4376941)
Destructors aren't a good way to free resources in a garbage collected language.
Re:PHP finally gets finally by tomjen3 on Monday August 13, 2012 @04:33PM (#4377995)
I have yet to see a language that actually cleans up after itself. Many will attempt to free memory, but what about files, db connections, windows, sockets?
Re:PHP finally gets finally by reginaldo on Monday August 13, 2012 @05:31PM (#4378267)
Have you heard about Racket's custodians? [1] http://docs.racket-lang.org/reference/eval-model.html#(part....
Re:PHP finally gets finally by true_religion on Monday August 13, 2012 @04:04PM (#4377832)
Does ref-counting count as garbage collection?