From: VK on
Did you hear about
http://en.wikipedia.org/wiki/G%C3%B6del%27s_incompleteness_theorems#First_incompleteness_theorem
? IMHO you are trying to make in this little topic the same what Dr.
is trying with calendars: prove it wrong by having built both
consistent and complete description of something. I don't - plus I
definitely know that there are not any identifiers in here, I like the
semantics too much to let them into.
My explanation remains unchanged. Maybe(?) it is not complete but it
is consistent for any sane practical use. At the beginning I also
though to add "to syntax errors or to unforeseen results" with
var obj = {
300000000000000000003 : 0,
3000000000000000000003 : 0
};
but rightly didn't do it because it may give an idea that such coding
can be met somewhere or even possible while the task is to lock such
path for thinking completely. "syntax error" sounds short and serious,
verbosed explanations of possible problems spoil the effect. It's just
like "don't go on the red or may be killed". There is no need to spell
all possible vehicles causing the death and all possible deadly
options. :)

//////////////////////
// explanation starts

Object constructor property names are always treated as string
literals, so quotes around them may be omitted in the source code to
speed up typing and/or for a better code readability. The drawback of
such syntactical shortcut is that then all property names have to obey
the JavaScript naming rules and not be equal to any of JavaScript
reserved words: otherwise due to some parser quirks they may lead to
syntax errors. This way it is highly suggested do not use the above
mentioned syntax shortcut and to use full syntax with quotes around
each property name.

var obj = {
foo : 'bar' // no doughnuts!
}

var obj = {
'foo' : 'bar'// good boy!
}

// explanation ends
//////////////////////

From: Thomas 'PointedEars' Lahn on
VK wrote:

> Lasse Reichstein Nielsen wrote:
>> To show, once again, that it's not just a matter of omitting quotes,
>> consider this object initializer:
>> var obj = { "3.0" : 42, 3.0 : 37 };
>>
>> Guess what is alerted by:
>> alert([obj[3], obj[3.0], obj["3"], obj["3.0"]]);
>> (It's "37,37,37,42", if there was any doubt)
>
> I am not forcing anyone to "my universe", just explaining why am I
> comfortable in there.

It is very easy to explain why you *feel* comfortable in your fantasy world.
The cause is what can rightly be called the Matrix phenomenon now: Ignorance
is bliss; but only to the ignorant. If you decide to ignore the facts
presented to you, if you decide to deceive yourself making up elaborate
stories instead, then it is virtually impossible for anyone else to convince
you that you are mistaken.

However, as a matter of fact, those who defy reality will ultimately cause
their own doom, and the problem will solve itself in time. So keep on
taking your blue pills, but please: stop expecting reasonable people to jump
off the cliff with you.

> If one decides to make the interpreter dizzy

An interpreter (that is not relevant here as the source code is compiled
first, so the tokenizer must be part of the compiler instead) cannot be made
dizzy in any case. It is an implementation of relentless mechanical
(binary) logic, operating upon defined rules.

> or to conduct a "sh** check"

A *what*?

> on it rather than writing reliable programs

In order to write reliable programs one needs to understand the rules of the
used programming languages first. You have sufficiently demonstrated that
you are incapable of that.

> than ECMA's Book of Source (Chapter 6)

There is no such thing, Often Wrong. This is not about religion; it is not
about belief, but about facts; specified, implemented, evident facts.

> provide a lot of "useful" hints: [...]

No, your postings so far range only from being a nuisance to an annoyance;
they must be incredibly confusing to newcomers. That is probably the only
reason why I do not have you killfiled yet: Someone has to deal with your
naive, foolish presumptuousness, disprove your fairytale stories, correct
your outright lies; in short: someone has to put you in your place.

If only you stopped doing that ...


PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300dec7(a)news.demon.co.uk>
From: Richard Cornford on
VK wrote:
> Did you hear about
> http://en.wikipedia.org/wiki/G%C3%B6del%27s_incompleteness_theorems#First_incompleteness_theorem

Yes. Though you may be unique to date in proposing it as a justification
for not attempting to be consistent in technical explanations.

> ? IMHO you are trying to make in this little topic the same
> what Dr. is trying with calendars: prove it wrong by having
> built both consistent and complete description of something.

There is nothing wrong with consistent and complete explanations where
they are possible. We are not, after all, in the realm of number theory
here.

But what is your "prove it wrong by ... " about? Generally, a statement
that is contradicted by empirical evidence is wrong. That my not apply
in "VK's universe" but for the rest of that that is something that
nobody bothers arguing about. It is just too difficult to imagine a
rational thought process that would result in you.

> I don't -

That has been observed. The only disputable aspect of your behaviour in
this regard is theorising about the explanation.. As you know, I
consider that mental illness on your part is the theory that best fits
the evidence of your actions.

> plus I definitely know that there are not any identifiers in
> here,

No identifiers?

> I like the semantics too much to let them into.

Does that mean something in "VK's universe"?

> My explanation remains unchanged.

Evidently, but it also remains needlessly convoluted/complex and
insufficient to explain the reality.

> Maybe(?) it is not complete

Maybe?

> but it is consistent for any sane practical use.

It is that inability to perceive what a "sane practical use" is that
leaves me leaning towards the mental illness theory. An explanation that
leaves a programmer in a position to accurately predict how the computer
code they write will be interpreted when parsed and behave when executed
has a very obvious use, at least for the rational.

> At the beginning I also though to add "to syntax errors or to
> unforeseen results" with
> var obj = {
> 300000000000000000003 : 0,
> 3000000000000000000003 : 0
> };

Bullshit.It the incompleteness of your understanding of the subject that
leads you to miss this short of thing out.

> but rightly didn't do it because it may give an idea that such
> coding can be met somewhere or even possible while the task is
> to lock such path for thinking completely.

An unrealistic task. People explore, and then they come here looking for
explanation of what they find, at least if they cannot find an
explanation for it on their own. That is entirely understandable and
expected, but it is best if when they receive the explanation they do
not have to tare down some previous fantasy explanation into which their
new discoveries cannot fit.

Of course, if you don't require consistency in your understanding of a
subject there is no need to modify pre-existing fantasies when
contradictory evidence is encountered. No, in "VK's universe" you put
your fingers in your ears and sing "La la la" until you can "lock such
path for thinking completely".

> "syntax error" sounds short and serious,
> verbosed explanations of possible problems spoil the effect.

That effect would FUD?

(Fear, Uncertainty and Doubt:-
<URL: http://en.wikipedia.org/wiki/Fear,_uncertainty_and_doubt >
)

> It's just like "don't go on the red or may be killed". There
> is no need to spell all possible vehicles causing the death
> and all possible deadly options. :)

What has that got to do with anything?

> //////////////////////
> // explanation starts
<snip: Nothign worth seeing here.>
> // explanation ends
> //////////////////////

Richard.

From: RobG on
On Oct 25, 5:26 am, "Richard Cornford" <Rich...(a)litotes.demon.co.uk>
wrote:
> Thomas 'PointedEars' Lahn" wrote:
> > Richard Cornford wrote:
>
> >> There is no need to propose any automatic insertion of quotes
> >> into the source text (or token stream) in order to account for
> >> the behaviour seen. And indeed such insertions would be
> >> contrary to the behaviour observed. For example:-
>
> >> var x = {
> >>     x-y:5
> >> };
>
> >> - is a syntax error but:-
>
> >> var x = {
> >>    'x-y':5
> >> };
>
> >> - is not. The first being a mathematical expression in a context
> >> that only allows for Identifiers, string literals and numeric
> >> literals, while the second is a numeric literal.
> >                                  ^^^^^^^
> > Do you mean "string"?
>
> Yes I did.
>
> > As for the rest, thank you for your patient explanations.  One can
> > only hope something of it gets through to him.
>
> Pigs may fly.  ;-)

While your wisdom is no doubt lost on VK, it is greatly appreciated by
others who learn by reading your responses.

If you were to collate your posts to clj for a book along the lines of
Crockford's Good Parts, I'm sure it would quickly become a best
seller.


--
Rob
From: optimistx on
Richard Cornford wrote:
> As you know, I
> consider that mental illness on your part is the theory that best fits
> the evidence of your actions.
Interesting that you say so.