regarding the actually topic of this thread I'm very interested
in the concept of 'weak references' (as Apple seems to call them),
what '$this->this' is all about, and whether using reference notation
with object variable assignment is even allowed, whether it it makes
a difference and what the future holds with regard to being able to
use/create references to object 'handles'.
Yes, back to the thread :)
So a colleague on the propel-dev list has convinced me that my
approach is bad, mostly because of how references behave in PHP.
While doing my "research" I stumbled on to the fact that making
references doesn't bump refcounts, and got so excited by the
potential "solution" to my problem that I forgot about the flip-side
of using references, which is that it binds the reference to the same
place as the original. Thus, when the original changes, it changes
the target of your "stored link". So my solution in the end won't
work at all.
However, the need is definitely still there.
Andi briefly mentioned an alternative solution, and I am eagerly
awaiting his complete response... c'mon with it Andi!
Another poster recommended that maybe PHP isn't the right "tool" for
the job [of importing data]. This would imply that PHP is for your
web pages, but no other part of your application. Well, if I am
starting out on a new project, I'd like for the entire project to be
in one language. I want to be able to have all of my business logic
for my application's model in one place, and be able to use this core
model from the web, scripts, etc.
This poster's comment would indicate that PHP's stated purpose is as
a web tool only, and isn't intended as a project (now or in the
future) to be a universal solution to building applications. If this
is the case, I'd consider it a shame, and it would have me seriously
reconsider using PHP long term. A mindset like this is why there is
such anti-php sentiment from the ruby and python people. Whether you
like it or not, PHP has become a complete language platform. I like
the PHP paradigm overall, but need to be able to have projects
entirely in PHP for it to be worthwhile to use. If I have to develop
my core model in Java [or whatever], I am not sure that I would use
PHP to do the front-end.
Although, on a side note, I did recently use the excellent php-java-
bridge to build a PHP front-end to a Java search engine, and it works
very well. Not sure yet about performance, though.
Alan
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php