VK said:
Matt said:
Try to think of it this way:
Undefined is like your knowledge of javascript - it has been declared,
but currently holds no value.
The question is not what does say [0,,2] suppose
to do upon ECMAScript specs. They could require
that on each elision the screen has to change
the bgcolor in the palette sequence.
If someone assert that it should do one thing the question very much is
whether it should do that. You where the one asserting that elisions
should directly result in array index elements being created on an
array object, that was a wrong interpretation of what should happen.
The question is what does [0,,2] *mean* in the
programming context.
If we are talking about javascript the only relevant meaning is what it
means in javascript. What interpretations it may be subject to in other
contexts is completely irrelevant (isn't it a syntax error in Java?
does that make it a syntax error everywhere else?).
For my deranged mind it
means the same since at least 1998: explicit
initialization of all array members (reflected
as properties in the underlying object).
That is not quite enough of a sentence to mean anything, so it probably
is the product of your mind.
Netscape 4.x (including Netscape 4.5 used as
basis for ECMAScript)
Netscape 4 was an ECMA 262 2nd edition implementation.
behaved this way and no
one had any problem with it - though the usage
of elision is very rarely needed with a proper
programming.
Which is why implementation bugs in this area have little practical
impact, though (with the exception of Microsoft) they are being fixed.
But (and it brings us back to the definition of
"a bug") if a bug is only a non-compliance to
a written specification then
[0,,2] indeed became a bug overnight after
December 1999.
No, it became a bug when people announced that their script engines
were ECMA 262 3rd edition implementations.
So shall be it. It is a "Mozilla bug".
Yes, they claim to implement ECMA 262 3rd ed, so they can recognise
when they have a bug.
<OT>
About "VK is extremely bad programmer, doesn't know JavaScript" and
such.
VK writes programs that either demonstrate a failure to understand what
the code written actually does, or a tendency to do pointless things
with a full knowledge that they are pointless (such as returning null
from a function that is only used as constructor and putting the - void
- operator in front of a function call even though the result of the -
void - expression is never used).
A from behind the corner burking of this kind do not put me down
but of course it does upset me.
While a productive response would be to realise that the criticism is
valid and improve your knowledge and understanding to the point were
you could avoid writing fundamentally poor code.
I wrote my fist line of JavaScript
in 1996, and in 1998 my PopUp calendar (IE4/NN4)
became a standard de-facto in Contra Costa county
with 30 licenses sold in the Bay Area and one even
to Australie.
In a world where the general standard is appalling getting people who
don't know any better themselves to use poor scripts is not much of an
achievement.
AFAIK all this happened years before
some of my critics even knew about JavaScript not
talking about programming on it.
Yes, there seem to be many people who have acquired an infinitely
superior understanding of the subject in a relatively short period of
time. They have done that by recognising when they have been wrong and
doing something to change that. Your intransigence and groundless
belief that the understanding you think you currently have is already
faultless gets in the way of your progressing.
As of to "show up" now: there is an extra obstacle as
don't want to reveal my personality
It is your identity that you don't want to reveal (for very obvious
reasons), your personality is an open book.
and I want to stay VK in c.l.j.
Well at least that will help people find the extent of your folly in
the archives.
ECMAScript did not change
for almost 7 years now,
Which is a good thing as the implementations are now very stable in
their conformance and the few remaining bugs are restricted to areas
that are almost never used. That makes understanding what ECMA 262 says
and means a very good practical guide to what can be expected of
implementations.
and IMHO pathetic discussions over say
commas in array initializer is a sure sign of degradation.
Some fresh blood may be needed
Then why did you post the original post in this thread? Or is your
problem only that your post was discussed?
Also we take Matt's suggestion for action (that the code
samples is everything and words are nothing), then c.l.j.
would become a very silent place
But opinions on how browser scripting should be done well from people
who do not even understand the code they write are worthless, so seeing
some of the code written by people is a reasonable criteria for
weighting their comments.
From all current and former cabbal members I know for sure
only about Douglas Crockford (JSON) and Matt himself (AjaxToolbox)
that they can write quality programs in JavaScript.
Not quite a sentence again
From say Richard Cornford in three years I've seen only one
self-contained application: a rather tedious scrollable table
script written more than two years ago. Ever since I did not see
a piece longer then a few lines (a dependent subroutine or a part
of dependent subroutine) - besides endless ECMA quoting.
And does the scrollable table work in more actual browsers that any
equivalent script available, and cleanly degrade to usable HTML in
every browser where it is not actively supported? Did it take less than
6 hours to write from start to its current state using pre-existing low
level components? And has it not needed any maintenance during its life
to date?
Why, when you have made yourself look a total idiot do you insist on
trying to direct attention to the irrelevant? It doesn't fool anyone.
Are you expressing one of your fantasies or trying to imply something
about javascript, where null is the singe value of the Null type?
Not so. There's at least one other common programming language with a
similar construct (VBA, with vbEmpty).
You have messed up your quoteing.
<snip>
Perl defines javascript how?
You mean like with Infinity or undefined as "real" entities stored
somewhere?
I mean something that is part of the langue, can be directly employed
by a programmer and is called 'undefined'. (The question would make
more sense if you had not edited its context away, but then you need it
to be derived of its context else your responses will look really
insane.)
I don't know of such languages or systems and I doubt very much
they will ever appear: though it would be interesting to touch and feel
say Infinitity while remaining in this world
So is your position then that the real meaning of something that you
see as unique to javascript is determined by the meaning of something
else somewhere else?
Alas everywhere (including JavaScript) these are just subroutines
and banal 1's and 0's interpreted in certain way in the program
stream.
Your point?
That is exactly the point I've made before: about the danger of
interpreting a *language* by reading machine *engine*
specifications. Low level processes keeping 1's and 0's in the
needed order are not the same as higher level programming
entities. On the lower level naturally there is no NaN or
Infinity or undefined or null or so. Yet they have to be represented
somehow
A value is a concept in programming languages, and they will have
representations in the language's implementation. They are also used;
assigned to variables/properties, returned from functions/methods and
so on. Your problem is that when you see - undefined - you are applying
a concept to it that is not the concept of a value, and that is sending
you off on a flight of fantasy.
A declared but not initialised variable may be a concept. Marking a
variable that is in that condition by provisionally assigning a
(preferably unique and fully identifiable) value to the variable is a
reasonable practice, but that does not turn the value assigned into the
concept of an uninitialised but declared variable.
You won't see that, but then logic has never featured in your intellect
(one of the reasons your code is so poor).
Richard.