Re: <FAQENTRY> ; Array and hash (associative array)
VK wrote:[color=blue][color=green]
>> What exactly is an "end-user" of javascript?[/color]
>
> Nothing like "amateur" or "beginner", I did not mean *that*.
> End-user is a person who's using JavaScript for programming,
> but who doesn't program JavaScript engine itself
> (Using C++/C#). So for him it's important to know the
> difference in all contexts between say:
> var myVar = 0;
> and
> myVar = 0
> At the same time it's irrelevant to him/her at what
> phisical address this var will be allocated and how
> the system will manage to reallocate the memory if
> latter (s)he will do
> myVar = "Now it will be a string";
> But (s)he must know that it's possible and that it
> will override the previous value.[/color]
Not that it is possible that it will overwrite the previous value, but
that it _will_ overwrite the previous value. This is computer
programming; pure mechanical logic with absolutely deterministic
behaviour.
Yes the programmer of javascript does not need to know anything about
the language implementation. They do need to know about the language's
specified behaviour, in as much technical detail as possible. They need
that understanding to use the language well, and they need that
understanding in order to talk about the language to others in common
trems.
[color=blue]
> So it's equal for him/her if that "undefined" is just
> created by internal sub or indeed was kept somewhere
> in the memory.[/color]
That is exactly the sort of thing that a javascript programmer does need
to comprehend. There is an important difference between a property that
has been created but holds the Undefined value and a property that never
has existed. The distinction is critical to understanding scope chain
Identifier resolution and the prototype chian.
Richard.
VK wrote:[color=blue][color=green]
>> What exactly is an "end-user" of javascript?[/color]
>
> Nothing like "amateur" or "beginner", I did not mean *that*.
> End-user is a person who's using JavaScript for programming,
> but who doesn't program JavaScript engine itself
> (Using C++/C#). So for him it's important to know the
> difference in all contexts between say:
> var myVar = 0;
> and
> myVar = 0
> At the same time it's irrelevant to him/her at what
> phisical address this var will be allocated and how
> the system will manage to reallocate the memory if
> latter (s)he will do
> myVar = "Now it will be a string";
> But (s)he must know that it's possible and that it
> will override the previous value.[/color]
Not that it is possible that it will overwrite the previous value, but
that it _will_ overwrite the previous value. This is computer
programming; pure mechanical logic with absolutely deterministic
behaviour.
Yes the programmer of javascript does not need to know anything about
the language implementation. They do need to know about the language's
specified behaviour, in as much technical detail as possible. They need
that understanding to use the language well, and they need that
understanding in order to talk about the language to others in common
trems.
[color=blue]
> So it's equal for him/her if that "undefined" is just
> created by internal sub or indeed was kept somewhere
> in the memory.[/color]
That is exactly the sort of thing that a javascript programmer does need
to comprehend. There is an important difference between a property that
has been created but holds the Undefined value and a property that never
has existed. The distinction is critical to understanding scope chain
Identifier resolution and the prototype chian.
Richard.
Comment