Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #32521 > unrolled thread

Re: questions re Javascript

Started byJoshua Cranmer 🐧 <Pidgeot18@verizon.invalid>
First post2015-09-04 10:09 -0500
Last post2015-09-05 22:16 +0200
Articles 8 — 6 participants

Back to article view | Back to comp.lang.java.programmer

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: questions re Javascript Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> - 2015-09-04 10:09 -0500
    Re: questions re Javascript Tim Streater <timstreater@greenbee.net> - 2015-09-04 16:37 +0100
      Re: questions re Javascript Tim Streater <timstreater@greenbee.net> - 2015-09-04 22:51 +0100
        Re: questions re Javascript Eternal Hope <laughingspam99@gmail.com> - 2015-09-05 20:29 +0100
    Re: questions re Javascript "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-09-04 18:17 +0200
    Re: questions re Javascript Arne Vajhøj <arne@vajhoej.dk> - 2015-09-04 19:40 -0400
      Re: questions re Javascript Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-09-05 09:47 +0200
        Re: questions re Javascript Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-09-05 22:16 +0200

#32521 — Re: questions re Javascript

FromJoshua Cranmer 🐧 <Pidgeot18@verizon.invalid>
Date2015-09-04 10:09 -0500
SubjectRe: questions re Javascript
Message-ID<mscc3f$apc$1@dont-email.me>
On 9/2/2015 6:20 AM, Stefan Ram wrote:
>    There are so many similiarities between the two languages,
>    that I can't name them all.

Really? I can:

* Java and JS share the same core C-ish syntax (but not necessarily 
semantics) for expressions and statements.
* They both use a strictly-defined evaluation order instead of C's 
undefined evaluation order.
* A few method names (e.g., toString, or Math.sin) are the same.
* The JS Date object is explicitly modelled on Java's Date object 
(unfortunately).
* Their names start with the same first four letters.

That's really about it. Java and JS use hugely different internal 
representations, and the semantics are often vastly different. Most 
notably, JS has no integers, only IEEE754 doubles, and the == operator 
in Java corresponds to === in JS where == in JS is .equals() in Java.

For my part, calling the languages similar when semantics are so 
different does a disservice to neophytes attempting to learn one or the 
other. It's like saying English and French are similar, because they 
share the same grammatical constructs and many words are cognates. 
Peut-être il est vrai, mais on ne peut pas converser avec un autre sans 
apprendre à parler l'autre langue.

-- 
Beware of bugs in the above code; I have only proved it correct, not 
tried it. -- Donald E. Knuth

[toc] | [next] | [standalone]


#32523

FromTim Streater <timstreater@greenbee.net>
Date2015-09-04 16:37 +0100
Message-ID<040920151637554925%timstreater@greenbee.net>
In reply to#32521
In article <to-do-20150904163124@ram.dialup.fu-berlin.de>, Stefan Ram
<ram@zedat.fu-berlin.de> wrote:

>=?UTF-8?Q?Joshua_Cranmer_=f0=9f=90=a7?= <Pidgeot18@verizon.invalid> writes:
>>other. It's like saying English and French are similar, because they 
>>share the same grammatical constructs and many words are cognates. 
>
>  What I objected to was the typical wording
>
>      »JavaScript /has nothing to do/ with Java.«.
>
>  To me, it would be disputable too when one would say, 
>
>      »English has nothing to do with French.«.
>
>  Also, it depends on the point of view. Compared with a
>  language like »Archi«, which has 1.5 million forms of verb
>  endings and more than 150 phonemes, English and French
>  suddenly appear to be more similar.

Given that the OP didn't seem to know very much, at this point in his
learning process it is *much* *better* to say that these languages are
not related. Then he can get on. He can learn a more nuanced lesson
later on. All you and similar posters are likely to do at this stage,
with your pedantry, is to confuse him.

-- 
"Once you adopt the unix paradigm, the variants cease to be a problem - you
bitch, of course, but that's because bitching is fun, unlike M$ OS's, where 
bitching is required to keep your head from exploding." - S Stremler in afc

[toc] | [prev] | [next] | [standalone]


#32530

FromTim Streater <timstreater@greenbee.net>
Date2015-09-04 22:51 +0100
Message-ID<040920152251414544%timstreater@greenbee.net>
In reply to#32523
In article
<Java-and-JavaScript-20150904164419@ram.dialup.fu-berlin.de>, Stefan
Ram <ram@zedat.fu-berlin.de> wrote:

>Tim Streater <timstreater@greenbee.net> writes:
>>Given that the OP didn't seem to know very much, at this point in his
>>learning process it is *much* *better* to say that these languages are
>>not related. Then he can get on. He can learn a more nuanced lesson
>>later on. All you and similar posters are likely to do at this stage,
>>with your pedantry, is to confuse him.
>
>  You might underestimate the intelligence of a beginner
>  when you believe that the correct answer
>
>      »JavaScript and Java are different languages.«
>
>  will significantly confuse him.

You didn't say they were different languages. If you had, all would
have been well. Instead you went off into a pedantic labyrinth where
the learner doesn't need to go.

It has nothing to do with the learner's intelligence and everything to
do with interpreting his question and giving a useful answer.

-- 
"... you must remember that if you're trying to propagate a creed of 
 poverty, gentleness and tolerance,  you need a very rich, powerful,
 authoritarian organisation to do it."             - Vice-Pope Eric

[toc] | [prev] | [next] | [standalone]


#32540

FromEternal Hope <laughingspam99@gmail.com>
Date2015-09-05 20:29 +0100
Message-ID<msffmh$5qo$1@dont-email.me>
In reply to#32530
On 04/09/2015 22:51, Tim Streater wrote:
> In article
> <Java-and-JavaScript-20150904164419@ram.dialup.fu-berlin.de>, Stefan
> Ram <ram@zedat.fu-berlin.de> wrote:
>
>> Tim Streater <timstreater@greenbee.net> writes:
>>> Given that the OP didn't seem to know very much, at this point in his
>>> learning process it is *much* *better* to say that these languages are
>>> not related. Then he can get on. He can learn a more nuanced lesson
>>> later on. All you and similar posters are likely to do at this stage,
>>> with your pedantry, is to confuse him.
>>
>>  You might underestimate the intelligence of a beginner
>>  when you believe that the correct answer
>>
>>      »JavaScript and Java are different languages.«
>>
>>  will significantly confuse him.
>
> You didn't say they were different languages. If you had, all would
> have been well. Instead you went off into a pedantic labyrinth where
> the learner doesn't need to go.
>
> It has nothing to do with the learner's intelligence and everything to
> do with interpreting his question and giving a useful answer.

Sanity.

Alive and well in c.l.j.p.

Good to see



-- 
Laughing Spam Fritter

[toc] | [prev] | [next] | [standalone]


#32526

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2015-09-04 18:17 +0200
Message-ID<XnsA50BBA0F890CBeejj99@194.109.6.166>
In reply to#32521
ram@zedat.fu-berlin.de (Stefan Ram) wrote on 04 Sep 2015 in 
comp.lang.javascript:

>   What I objected to was the typical wording
> 
>       ŻJavaScript /has nothing to do/ with Java.Ž.

It has NOTHING TO DO with it.

That MEANS:
that the word "Java" in "Javascript" does not mean 
it is the scripting [=interpreting] form
of the compiler-language "Java", and cannot be compared with 
Vbscript as the scripting form of Visual Basic, 
ot other script forms of compiler lenguages,
or perhaps other compiler forms of scripting languages.

It does NOT mean that:
both are not computer-languages,
both are not a subset of English words,
both have never influenced each other,
both are nowhere influenced by any common earlier language,
are both used by human beings, 
some of them being smarter than others.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#32531

FromArne Vajhøj <arne@vajhoej.dk>
Date2015-09-04 19:40 -0400
Message-ID<msda5l$agg$1@speranza.aioe.org>
In reply to#32521
On 9/4/2015 11:33 AM, Stefan Ram wrote:
> =?UTF-8?Q?Joshua_Cranmer_=f0=9f=90=a7?= <Pidgeot18@verizon.invalid> writes:
>> other. It's like saying English and French are similar, because they
>> share the same grammatical constructs and many words are cognates.
>
>    What I objected to was the typical wording
>
>        »JavaScript /has nothing to do/ with Java.«.
>
>    To me, it would be disputable too when one would say,
>
>        »English has nothing to do with French.«.

I think the term "has nothing to do with" should be seen in context.

If it is a thread about the evolution of languages and how they
relate, then it is not a good statement.

If it is a thread with a specific question about
syntax/semantics/library, then I think it is a pretty good
statement.

Any attempt to answer a Java question based on JavaScript
or a JavaScript question based on Java is very bad, because
the risk of the answer being wrong is huge.

And it is actually the same about English and French.

If one is discussing history then certainly French
influenced English after 1066 and in modern times
English has probably influenced French a little bit as
well (even though they try hard to create French
equivalent words).

But if it is a question about grammar rules and
pronunciation, then it would most likely result in
incorrect answers to try and answer question for
one based on the other.

Arne


[toc] | [prev] | [next] | [standalone]


#32539

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2015-09-05 09:47 +0200
Message-ID<3247094.1kJgyrEJG5@PointedEars.de>
In reply to#32531
[F'up2 comp.lang.javascript]

Arne Vajhøj wrote:

> On 9/4/2015 11:33 AM, Stefan Ram wrote:
>>    What I objected to was the typical wording
>>
>>        »JavaScript /has nothing to do/ with Java.«.
>>
>>    To me, it would be disputable too when one would say,
>>
>>        »English has nothing to do with French.«.
> 
> I think the term "has nothing to do with" should be seen in context.
> 
> If it is a thread about the evolution of languages and how they
> relate, then it is not a good statement.
> 
> If it is a thread with a specific question about
> syntax/semantics/library, then I think it is a pretty good
> statement.

The statement should be modified to say “has *little* to do with Java” in 
that context because JavaScript was intentionally designed to resemble Java 
syntactically and semantically.

Please stop crossposting without Followup-To.  A discussion belongs only 
into to *one* newsgroup; in this case, comp.lang.javascript.
 
-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#32542

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2015-09-05 22:16 +0200
Message-ID<1956488.2vupmE4M81@PointedEars.de>
In reply to#32539
[F'up2 comp.lang.javascript]
 
Thomas 'PointedEars' Lahn wrote:

> Arne Vajhøj wrote:
>> On 9/4/2015 11:33 AM, Stefan Ram wrote:
>>>    What I objected to was the typical wording
>>>
>>>        »JavaScript /has nothing to do/ with Java.«.
>>>
>>>    To me, it would be disputable too when one would say,
>>>
>>>        »English has nothing to do with French.«.
>> 
>> I think the term "has nothing to do with" should be seen in context.
>> 
>> If it is a thread about the evolution of languages and how they
>> relate, then it is not a good statement.
>> 
>> If it is a thread with a specific question about
>> syntax/semantics/library, then I think it is a pretty good
>> statement.
> 
> The statement should be modified to say “has *little* to do with Java” in
> that context because JavaScript was intentionally designed to resemble
> Java syntactically and semantically.

And, I should add, probably as a result of the Sun/Netscape agreement, 
starting from version 1.2 (in Netscape 4.0), (Netscape) JavaScript was 
modified to access Java applets (a feature called LiveConnect, actually a 
part of the Netscape AOM, which was removed from the core language 
definition with version 1.4 (server-side only) and eventually became 
XPConnect, an official part of the Mozilla AOM, with Mozilla JavaScript 
1.5/Mozilla 1.0; the origin of the Netscape Plugin API [NPAPI] for which 
support is gradually being removed from browsers now), and Java was modified 
so that you could access JavaScript code from applets embedded in an HTML 
document (still called LiveConnect).

<https://en.wikipedia.org/wiki/NPAPI> p.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web