[Noisebridge-discuss] anyone interested in a javascript study group?

Wladyslaw Zbikowski embeddedlinuxguy at gmail.com
Tue Mar 29 19:44:27 UTC 2011


Some open-ended questions on Crockford Ch. 2, "Grammar".

p. 6

/* /* foo */ */ is not a valid comment. Thus, it is not possible to
comment out a block of text as /* $BLOCK */ because $BLOCK may contain
a */ (just as in C). Is there any advantage to this design, as opposed
to matching /* with */ (other than parser complexity)?

p. 8

Crockford does not start number literals with 0; is this
legal/meaningful in JavaScript?

Why does Crockford not use numbers higher than 1.8+e308? There seems
to be a hard limit here in Perl as well (2^1024-1).

What is the advantage of NaN != NaN semantics? If foo === NaN were
valid, there would be no need for isNaN(). Compare to SQL NULL !=
NULL.

p. 9

What is escaped forward slash ("\/") used for?

"Strings are immutable" - what are some implications of this? [1]
methods can't change the string in-place, so s=s.toLower() instead of
s.toLower() [2] strings may be passed by reference [3] Array.join()
may be faster than + for concatenating strings, if it avoids creating
intermediate objects.

On Sun, Mar 20, 2011 at 1:55 PM, Wladyslaw Zbikowski
<embeddedlinuxguy at gmail.com> wrote:
> On Sat, Mar 19, 2011 at 1:29 PM, Wladyslaw Zbikowski
> <embeddedlinuxguy at gmail.com> wrote:
>> Seems like there was a pretty good response for this; I'll be at the
>> space 1pm Sunday (Saturday evenings tend to have conflicts).
>
> I just reviewed chapter 1; here are a few references for anyone who
> wants to review the terminology:
>
> "JavaScript's functions are first class objects"
> https://secure.wikimedia.org/wikipedia/en/wiki/First-class_function
>
> "with (mostly) lexical scoping"
> https://secure.wikimedia.org/wikipedia/en/wiki/Scope_%28programming%29#Lexical_scoping
>
> "JavaScript is a loosely typed language"
> https://secure.wikimedia.org/wikipedia/en/wiki/Weak_typing
>
> I anticipate that Sunday at noon or 1 will be best for me, but if
> people prefer Saturday evening we can try that next week.
>



More information about the Noisebridge-discuss mailing list