T
Thomas 'PointedEars' Lahn
David said:Thomas said:David said:Thomas 'PointedEars' Lahn wrote:
David Mark wrote:
[...] ISTM that if you declare a global - window - variable, you are
going to screw it up. No?
AFAIR, nobody suggested doing that. (And yes, you are going to screw ^^^^^
up in the environments we know about. But this is about unknown
environments, is it not?)
It is about writing a script that will work in non-browsers, as well as
browsers. [...]
And yes, the OP did suggest declaring a global - window -
variable and "calling it a day".
Granted, he did; however, I did not, and your suggestion is not any
better than his.
Are you saying the OP is a nobody?
Fallacy. The word "granted" should have given you some indication what my
reply was about.
And my primary suggestion was virtually identical to yours (save for an
underscore in front of your global variable).
But not what you made of it.
Now you are going on about an aside.
Your fallacies in this matter are asides? Ah, maybe *that* is why I cannot
take them seriously.
Whatever. Seems like an odd choice to define a global - window -
property if you are not advertising at least some sort of browser-like
compatibility.
What do you consider "browser-like"?
Some browsers do not have windows? That would be news.
See, even you can still learn something new here.
But you cited its absence as one of your gripes.
So what?
There are documented cases of non-browsers with global
setTimeout/setInterval methods and they work as you would expect them to
work in browsers.
What are those "non-browsers"?
So what are you trying to say?
That you are still jumping to conclusions.
Of course not. Where else would the message go on the server? Surely
not to the display.
Then you are ready for a holiday. For a start, the browser-like alert()
displayed for the *user* to see it, sometimes execution even stops until
the user has *confirmed* it or closed the window it usually shows.
Apples and oranges.
No.
I was referring to the idea that all host environments should define a
global - window - property.
It isn't up to a random environment to satisfy your misconceptions about
what it is supposed to do either.
Right, so some environments may send the message to an LCD display or
speak it or log it or whatever is appropriate. The point is that an
alert method should be expected to convey a text message.
No, it could be any message. But assuming a text message: Where would the
message be displayed, to whom, when, how? You are ignoring these aspects
completely.
Wouldn't be prudent.
In your humble opinion.
Yes, but there are always inferences involved with this stuff. You
can't do much of anything without inferring something.
You can do worse with inferring too much.
I think you are over-generalizing what I am saying.
I have been pointing out to you the inevitable conclusion that you did not
want to see.
A set of known browsers would instead indicate a multi-browser script.
After accepting this terminology, one must conclude that there is no such
thing as a cross-browser script, because we can only ever know a subset
of browsers.
Yes, and the implementors of the relatively rare non-browser host
environments
Why would they be rare? When? Where?
have that history to consider.
No, because they are not implementing for browsers.
They'd be foolish to completely ignore it
and redefine things such as alert to - for example
- ignore the first argument and display the same message every time.
Instead, foolishly act people like you who assume that everything must work
the same everywhere, and those who would not make it so would be foolish.
And this is all academic anyway. Who actually writes such scripts? As
we know, context is everything and even generalized _browser_ scripts
are considered a bad idea, so the whole argument is out there.
Logical fallacy: Appeal to ridicule.
PointedEars