VK said the following on 12/19/2007 3:08 AM:
On Dec 19, 8:41 am, Randy Webb <HikksNotAtH...@aol.comwrote:
><quote cite="VK in URL above">
IMO it is the only way to have any use out of extra features in a
cross-browser way: leaving out different hacks with dynamic "<script>"
write and separate .js files for different browsers.
</quote>
Do you ever stop and think about what you are writing before you write it?
Fine, rather than to be proven to be an idiot by Brendan Eich I prefer
to be proven to be an idiot by Randy Webb. As I guess the pleasure
should be mutual.
Yippeeeeee, I get to be proven an idiot by VK. This should be
entertaining. Hold on to your britches. It's gonna be a blast.
When server gets the request from client then it has two options: i)
choose the right script to send out of several or ii) to send single
script that will accommodate itself at runtime client-side. AFAIK the
second option is currently prevailing.
I changed the text above to reflect your self-correction. The second
option prevails because it is the most reliable option. Hands down.
This way I do not understand the reasoning of using language or type
attribute for script tag.
Because some pedantic moron at the W3C decided it should be mandatory
when it is typically useless.
And if we heed runtime client-side accommodation then why do we need to
depend on unreliable feature detection that can be easily spoofed and
even if not then doesn't guarantee that this is _that_ method with
_that_ outcome?
You have that same problem with the first option. Anything the browser
tells the server is spoof-able. So, how is it any more reliable to let
the server decide what to send if what it is being told is 100% spoof-able?
After long time forgotten conditional compilation has been "re-
discovered" everyone just jumped on it as the only really reliable
detection method.
They did? I haven't seen 20 posts in the last two years that used it and
about half of those are my own posts. So I don't see where "everyone
just jumped on it".
So instead of
if (windows.ActiveXObject)
it is now /*@cc_on */ etc
because it is the only one bringing some trust to the developer.
Any developer that does that is ignorant at best.
So why the same thing which is great for one application is evil for
other?
I have never thought of conditional compilation great for anything. I
use it as a self-admitted crutch and am leaning heavily towards a
different test in the one place I use it.
That would be the case if we had the situation of 1997/98
"whatever is not X - is Y" but we have not this situation as of now.
And that is what you are advocating doing again? You want it so that you
can distinguish between IE, Gecko, and any others? That is right back
where you started in 1997. 10 years of evolution to get right back where
you started. That isn't a step forward, it is 100 steps backwards.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -
http://jibbering.com/faq/index.html
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/