Re: get object name from within object
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: get object name from within object

From: Richard Cornford <Richard@litotes.demon.co.uk>
Date: Sun Jul 24 2005 - 21:03:57 CEST

warteschlange wrote:
> Richard Cornford wrote:
<snip>
> I got all the good answers very quick and came to the
> conclusion, that it is easier to solve it in php with a
> wrapper. But now i'm spending my time chatting around
> justifying my aproach.

Any suggestion of an interest in the names of functions (and
particularly variables that refer to objects and object instances (which
may be functions)) raises the suspicion that the underlying code is
fundamentally flawed in its design. And that a simpler, clearer (often
faster) and more direct alternative could be suggested in exchange for a
sufficient explanation of the problem context.

> Just asking a good question and not explaining all the
> background, does not automatically mean, that he/she is
> not aware of the rest.

Many people assert that they know and understand what they are doing,
while simultaneously making demands/request/assumptions that suggest
that they do not. And when they bother to engage to the point of
allowing others to actually understand what is being done it more often
as not turns out that they were unaware of something significant (and
often advantageous).

> I thought, pointing out
>> don't remind me:
>> * this works only 'sync' and it can block the browser
>> * i know AJAX/XML_RPC/SOAP

You realise that you have attributed that quote to me when you are its
author and not me.

> will avoid a discussion about these items.
>
> But i was wrong.
>
> So why not introduce a syntax in the discussons for
> marking out items not to be discussed?

Because nobody would pay any attention to it at all.

<snip>
> Sync is not a bad idea, it is just bad implemented
> in the browsers.

In an event driven system there is no need to block, so doing so is a
bad idea. But when blocking is known to block _everything_ (even if it
doesn't strictly have to) it should be a more obviously bad idea.

> (Other languages have a lot better mechanism to fetch a
> result from a function without blocking the rest, if
> needed : vb/c++/j++ ).
<snip>

And web browsers have completely viable mechanisms for allowing code to
react to events (including onreadystatechange on XML HTTP Request
objects) and javascript has mechanisms for preserving contexts between
the initiation of requests and the events following the response. So the
extent to which it is necessary to block is extremely questionable.

Richard.
Received on Tue Oct 18 03:00:50 2005