Re: undefined vs. undefined (was: new Array() vs [])
VK wrote:
>
>
Everywhere in the programming languages made by humans.
So you can cite examples of other languages that have a concrete
manifestation of something called 'undefined'? Because in javascript
there is a value of the Undefined type the meaning of undefined within
the language is specific and certain. You preference for some vague
concept derived from your misconceptions of other languages does not
alter the fact that in javascript the meaning is specific.
>
I am not aware of Undefined (capital 'U') value in JavaScript nor of
Null (capital N) value.
That will neither be the first thing nor the last thing that you are
unaware off.
The type names in ECMAScript have initial upper case letters. That
allows the type to be distinguished from the value whenever doing so is
significant (which is never really is as far as Undefined and Null are
concerted as each type only has one value).
No, it is a null literal. (undefined, Infinity and NaN are just the
Identifiers of global variables as far as javascript is concerned, and
all may be overwritten with new values).
It is part of the languae (ECMA 262 3rd Ed. Section 7.8.1):-
| 7.8.1 Null Literals
| Syntax
| NullLiteral ::
| null
|
| Semantics
| The value of the null literal null is the sole value of the Null
| type, namely null.
- a literal, like - true - and - false - are literals of Boolean type.
>
>
You're hitting the border of understanding of the problem! Don't
loose your concentration now.
No, I am explaining why your assertion of meaning must be false. If
something really did mean that "it had never seen the assignment sign"
then assignment of that something must be precluded.
>
I said don't loose the concentration :-) :-(
It is a fact that the undefined value can be assigned to variables and
object properties.
What it is is a value, and values can normally be assigned, unless they
are only used internally like 16 bit unsigned integers, but undefined
is not only used internally.
>
The same as in the relation to any other language:
"this entity never existed or doesn't exist anymore".
The undefined value is not an entity that never existed or has ceased
to exist. It is the single value of the Undefined type.
>
We are loosing him... Oxygen! :-)
Is there a reason that you think values that are available in a
language should not be assignable?
<snip>
IEEE 754 Infinity.
In javascript null is a single primitive value of the Null type.
In javascript undefined is a value, and so certainly does exist, along
with anything to which the undefined value is assigned.
To the extent that they are all values of some type or another they are
not different.
What are you wittering on about now. Are you proposing that null is
used to mark "holders" as free for garbage collection? How does that
work then?
There is little point in your recalling a discussions that if it was
worth while will have gone straight over your head, and you would have
misunderstood anyway.
Your opinions are, as always, worthless.
Richard.
VK wrote:
>><undefinedval ue means that the entity you tried to access
>>doesn't exists in the current execution context.
>>doesn't exists in the current execution context.
>Not in javascript.
Everywhere in the programming languages made by humans.
manifestation of something called 'undefined'? Because in javascript
there is a value of the Undefined type the meaning of undefined within
the language is specific and certain. You preference for some vague
concept derived from your misconceptions of other languages does not
alter the fact that in javascript the meaning is specific.
In javascript Undefined is a single value of a single type,
exactly like Null is a single value of a single type.
exactly like Null is a single value of a single type.
I am not aware of Undefined (capital 'U') value in JavaScript nor of
Null (capital N) value.
unaware off.
That seems like ECMAScript crap, if not then
show them to me.
show them to me.
allows the type to be distinguished from the value whenever doing so is
significant (which is never really is as far as Undefined and Null are
concerted as each type only has one value).
I am aware of Global properties:
undefined (small 'u')
Infinity
NaN
>
There is also null (small 'n') which is not a property of Global,
undefined (small 'u')
Infinity
NaN
>
There is also null (small 'n') which is not a property of Global,
Identifiers of global variables as far as javascript is concerned, and
all may be overwritten with new values).
never declared yet known to the script from the very beginning.
| 7.8.1 Null Literals
| Syntax
| NullLiteral ::
| null
|
| Semantics
| The value of the null literal null is the sole value of the Null
| type, namely null.
- a literal, like - true - and - false - are literals of Boolean type.
>>it means that this entity never was initialized:
>>"it has never seen the assignment sign
>>(=) from its right".
>>"it has never seen the assignment sign
>>(=) from its right".
>Then it would not be possible to assign an undefined value.
You're hitting the border of understanding of the problem! Don't
loose your concentration now.
something really did mean that "it had never seen the assignment sign"
then assignment of that something must be precluded.
>While in reality it is extremely easy to assign an undefined value.
I said don't loose the concentration :-) :-(
object properties.
Don't think of "what they said I can do with it?" and keep thinking
on "what is it?"
on "what is it?"
are only used internally like 16 bit unsigned integers, but undefined
is not only used internally.
>What is an "undefined entity" in relation to javascript?
The same as in the relation to any other language:
"this entity never existed or doesn't exist anymore".
to exist. It is the single value of the Undefined type.
>As the undefined value is just a value
>it should be possible to assign it.
>it should be possible to assign it.
We are loosing him... Oxygen! :-)
language should not be assignable?
Infinity - endless infinity
IEEE 754 Infinity.
NaN - not a number, something what even not equal to itself
null - this entity contains no valid data
null - this entity contains no valid data
undefined - this entity doesn't exist
with anything to which the undefined value is assigned.
...sure: regular values just like 0, 1, "foobar"... no difference at
all :-)
all :-)
not different.
Or maybe human mind's *abstractions* brought into programming
context to *compare* with or (in case with null) to mark data holders
as free for garbage collection?
context to *compare* with or (in case with null) to mark data holders
as free for garbage collection?
used to mark "holders" as free for garbage collection? How does that
work then?
I even recall some *really* old discussions about null and how
bad is it that they did not make it a Global property "just like
everything else". I'm glad they didn't and I'm sorry they violated
poor undefined.
bad is it that they did not make it a Global property "just like
everything else". I'm glad they didn't and I'm sorry they violated
poor undefined.
worth while will have gone straight over your head, and you would have
misunderstood anyway.
IMHO
Richard.
Comment