[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Safe navigation operator
- From: Cuero Bugot <cbugot@...>
- Date: Mon, 23 Aug 2010 07:24:08 -0700
> If you don't mind adding a pair of parenthesis (or quotes) to the end
> of the expression, you can get something pretty nice with __call :
It is a good idea to use __call as a final table access indeed ! In that way it is easy to catch the last access to the path, and then call an appropriate getter internally.
Your implementation seems to generate a lot of intermediary object though), but that may be optimized, using week tables so that at least it gets collected when unnecessary.