Conditional Compilation: add to Gecko

V

VK

Taking into account many new features in JavaScript1.6 and
JavaScript1.7 which are syntactically incompatible with Javascript
versions run on other browsers: would it be reasonable to propose as
"new feature request" at bugzilla.mozilla.org the conditional
compilation mechanics. Obviously this mechanics has to be then fully
compatible with the existing one for IE:
http://msdn2.microsoft.com/en-us/library/7kx09ct1(VS.71).aspx
and further links.

JScript sample:

<script>
/*@cc_on @*/
/*@if (@_jscript_version < 5.5)
window.alert('JScript below 5.5');
@elif (@_jscript_version >= 5.5)
window.alert('JScript 5.5 or higher');
@else @*/
window.alert('Not a JScript parser');
/*@end @*/
</script>

For the seamless accommodation it is needed to add to the list of
conditional compilation variables extra two:

@_javascript
Always returns true for Gecko platforms.
Respectively @_jscript always returns false for Gecko platforms.

@_javascript_version with possible values 1.5, 1.6, 1.7, (1.8, ..)

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.

Any opinions on that?
 
V

VK

Taking into account many new features in JavaScript1.6 and
JavaScript1.7 which are syntactically incompatible with Javascript
versions run on other browsers: would it be reasonable to propose as
"new feature request" at bugzilla.mozilla.org the conditional
compilation mechanics?

If anyone has an opinion on that and Bugzilla account she/he can also
comment at https://bugzilla.mozilla.org/show_bug.cgi?id=408835

In the latter case a possible "excited lexicon" of some clj posters
should be avoided so preserved for clj itself ;-)
 
V

VK

No, it would be a stupid idea. It will put you back in the days of
language="javascript1.2".

IMHO right the opposite, it would take us away from the old times with
separate files for separate situations. Though Brendan Eich seems to
think that "javascript1.2" way is still good enough and I'm of course
not in the position to enforce my opinion onto Gecko team: see
responses at
https://bugzilla.mozilla.org/show_bug.cgi?id=408835
 
V

VK

<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.

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 server-side. AFAIK the
second option is currently prevailing. This way I do not understand
the reasoning of using language or type attribute for script tag. 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?
After long time forgotten conditional compilation has been "re-
discovered" everyone just jumped on it as the only really reliable
detection method. So instead of
if (windows.ActiveXObject)
it is now /*@cc_on */ etc
because it is the only one bringing some trust to the developer. So
why the same thing which is great for one application is evil for
other? 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.

Just some idiotic thoughts of mine...
 
V

VK

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 server-side.

.... will accommodate itself at runtime client-side

Damn it. However obvious the typo is, I hope it will not become the
main subject of the discussion.
 
V

VK

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.

I guess it is my problem in the Usenet. In my own company I am ideas
generator rather than end-developer though I was in the latter
position for many years. This way I have a person who can make a
decent coffee for me and a person who takes my hints on the fly to
make anything out of them - or to prove them to be a trash. While the
coffee is not a crucial problem if I'm left alone - I still can make
myself something caffeine-containing: the habit to express only the
most necessary from my point of view positions hits me often, as I
don't have the regular guy to explain "VK meant to say..."

Any way: "VK meant to say: it will be more pleasurable to be proved to
be an idiot by Randy Webb rather than by Brendan Eich: whatever
'pleasure' it could be as such. It also should be pleasurable to Randy
Webb to prove once again that VK is an idiot. This way the pleasure
should be mutual".
Ooh.. I'm glad I'm keeping that guy on the salary...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top