Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So if I'm a PHP developer that actively uses lazy evaluation patterns in his day to day that means I'm... best of both worlds? (Hint: I am!)

Lazy values are a very powerful tool in the context of responding to requests as an intermediary between a client and a database due to how neatly you can reduce your peak memory usage - a lot of web-stuff follows the basic pattern of

1) Accept request

2) Figure out query to send to DB

3) Sent results to the user

Since results aren't actively scanned by the server in many cases the goal of being able to pass-through data without directly exposing any of your internal guts to the client is a noble one to pursue.



Yeah the critique about laziness here lives in a different context. Lazy eval is great, don't worry about it. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: