From: Lasse Reichstein Nielsen on
VK <schools_ring(a)yahoo.com> writes:

> You know guys, at the run of one week you just killed me, really. For
> some time I did believe that some posters here are professional
> programmers with CS diplomas trying to learn yet another language
> different from C++. So I attributed their obvious beserknesses to the
> classical CS education - so being forgiven to some rather wide extend.
> But the discussion at "Implicit object constructor misinterpretation"
> and comments like here did force me to change my mind. Now if I ever
> believe that you had any CS education, then only in some
> conspiratorial school "Witnesses of Integer" or similar of the kind :)
> Because no normal place you could came from with such a luggage of
> pseudo-philosophic twisted definitions of nearly anything from the the
> most core programming entities.

Nothing like abuse to make people shut up. Just don't mistake silence
for agreement after it, though.

Anyway, if everybody else disagrees with you, perhaps you should
entertain the idea that it might not be all of them who are in the
wrong.

Wars have been fought over the meaning of "strongly typed". Is it the
same as "statically typed" or does it mean that values can't change
their type, or one of the other six interpretations given at
<URL:http://en.wikipedia.org/wiki/Strongly_typed_programming_language>?

You are very strict in your insistence that Javascript is "loosely
typed", which is a name that is not even mentioned at
<URL:http://en.wikipedia.org/wiki/Type_system>
I can see that it is a term often used about "scripting like" languages,
to mean that you don't declare a variable to have a type, and you can
assign values of different types to the same variable.
Given the disagreement about "strongly typed", I can see the need for
a different name (other than "weakly typed") for this property.

You then insist that variables have types, because the opposite has to
be like VBScript's Variant type (which also fails the second
definition of "strongly typed" above, if I understand your description
of it correctly).
That's not what is usually meant by a variable having a type.

Variables have values, and values have types. Ofcourse you can say
that the variable has the type of its current value, but that is not
a type that is inherent in the variable. This is opposite languages
like Java, where variables do have a type.

> For other possible readers a few random links on the subject below.
> Also of course do not take some anonymous VK poster as being right by
> definition. Go and ask at MIT, Berkley, Carnegie Mellon or other
> reputable CS department for explanations.
>
> Typeless language
> http://www.microsoft.com/technet/scriptcenter/guide/sas_vbs_eves.mspx

From this, it seems that VBScript acts identically to JavaScript.
Variables can hold any value, and doesn't have a type. The values
still have types, but are automatically coerced to another type if
necessary.

> Loosely (dynamically) typed language
> http://www.computerhope.com/jargon/l/looslang.htm
> http://msdn.microsoft.com/en-us/library/14cd3459%28VS.85%29.aspx
> http://www.java2s.com/Tutorial/JavaScript/0100__Number-Data-Type/Variablesarelooselytyped.htm
> see also: type coercion
>
> Strongly (statically) typed language
> http://www.computerhope.com/jargon/s/strolang.htm

I accept that "loosly typed", as used in these links, also describe
JavaScript. I still maintain that a variable doesn't have a type in
a loosely typed language, in the sense normally meant by variables
having a type.

/L
--
Lasse Reichstein Holst Nielsen
'Javascript frameworks is a disruptive technology'

From: VK on
Lasse Reichstein Nielsen wrote:
> Nothing like abuse to make people shut up. Just don't mistake silence
> for agreement after it, though.

If I made you feel insulted then sorry.

> Anyway, if everybody else disagrees with you, perhaps you should
> entertain the idea that it might not be all of them who are in the
> wrong.

It may happen though and happened many times. Yet I am not expressing
some unknown theory no one else in the world ever expressed yet. That
makes a big difference.

> Wars have been fought over the meaning of "strongly typed". Is it the
> same as "statically typed" or does it mean that values can't change
> their type, or one of the other six interpretations given at
> <URL:http://en.wikipedia.org/wiki/Strongly_typed_programming_language>?
>
> You are very strict in your insistence that Javascript is "loosely
> typed", which is a name that is not even mentioned at
>  <URL:http://en.wikipedia.org/wiki/Type_system>
> I can see that it is a term often used about "scripting like" languages,
> to mean that you don't declare a variable to have a type, and you can
> assign values of different types to the same variable.
> Given the disagreement about "strongly typed", I can see the need for
> a different name (other than "weakly typed") for this property.

The language is defined as loosely typed by the original creators
(Netscape docs) and by Microsoft. OK, neither Netscape nor Microsoft
had a clue about programming and the right term usage and only a few
individuals at clj have it. We may accept this as an alternative
theory but who's theory is more exotic then?
If declaring Java variables like
int i;
boolean isFound;
we are not declaring some variable types irrelevant to the values they
hold: I never heard about such thinking approach anywhere outside of
clj and I do communicate with professional programmers in San Jose on
a daily basis. We simply have to announse in advance what types of
values variable i or isFound can point to and we cannot change or to
extend our decision later (casting issues aside).
OK, again let's assume no one understand the programming properly but
some people at clj.
I still don't understand why should I fill myself alienated by sharing
the most common opinion against 2-5 opinions expressed in a Usenet
group.

> You then insist that variables have types

See above. Variables do not have types, it is just a common shortcut
no one thought to be needed to explain or being leading to a
confusion. Values are of different types, and in strictly typed
languages one need to decide in advance what value type this or that
variable may hold at runtime.
In loosely typed languages such decision is not necessary because any
variable can hold any value type. It doesn't mean that there are no
types: for each separate type (Object, Boolean etc) there is a
different scavenger structure and each given moment each variable has
a strictly defined type - depending on the type of value it holds.
That is the difference from typeless languages where there are not
type distinctions so any values are represented by the same scavenger
type and having one universal type no matter what you assign: 1,
"foobar", false, objRef etc. Say in VBScript such universal type is
called Variant.
It is so easy and obvious even to me, having no classical education in
CS. It is obvious to my friends and partners who have such education.
It leads to some enormous understanding problems at clj, just like
with identifier definition which I never met in my life anywhere
outside of clj. Really, I showed the thread about the object
constructor to a professional C++ programmer who's my subcontractor
for years. He spent about 15 mins to get to the point of others
argumentation and then his only reaction was "wow!"
I don't want to insult anyone anymore, so let's say "wow!" means
"yeah, these guys are really bright ones".
From: Garrett Smith on
VK wrote:
> VK wrote:
>>> That's a wrong statement, you must be thinking of VBScript where
>>> indeed all variables independently on the current value are of the
>>> same Variant type. JavaScript is a *loosely typed* language, that
>>> means that each variable is of some certain type but this type can be
>>> changed to another one at runtime.
>
> Garrett Smith wrote:
>> No, my statement is correct. Variables are untyped.
>>
>> Nowhere are variables defined to have a type.
>
> (further similar nonsense removed)
>

You have not read the ECMA specification, in all these years?

It's only 170 pages.

> You know guys, at the run of one week you just killed me, really. For
> some time I did believe that some posters here are professional

Want to be professional? Read the specification. Understand the
language.

> programmers with CS diplomas trying to learn yet another language
> different from C++. So I attributed their obvious beserknesses to the
> classical CS education - so being forgiven to some rather wide extend.
> But the discussion at "Implicit object constructor misinterpretation"
> and comments like here did force me to change my mind. Now if I ever
> believe that you had any CS education, then only in some
> conspiratorial school "Witnesses of Integer" or similar of the kind :)
> Because no normal place you could came from with such a luggage of
> pseudo-philosophic twisted definitions of nearly anything from the the
> most core programming entities.

What you call "Psuedo-philosophic twisted definitions" I call the
ECMAScript specification.

I can and have read it. You may read it, too. Anyone may.


>
> I am not arguing with you anymore. You are definitely right, the Earth
> is flat and stays on three elephants.
>

That looks like a pretty obvious straw man.

> For other possible readers a few random links on the subject below.
> Also of course do not take some anonymous VK poster as being right by
> definition. Go and ask at MIT, Berkley, Carnegie Mellon or other
> reputable CS department for explanations.
>

The pertinent resource here is the ECMA-262 specification.

> Typeless language
> http://www.microsoft.com/technet/scriptcenter/guide/sas_vbs_eves.mspx
>

That is a tutorial for VBScript. It has nothing to do with anything
about ECMAScript. It is totally irrelevant.

> Loosely (dynamically) typed language
> http://www.computerhope.com/jargon/l/looslang.htm

A non-normative definition for jargon term "loosely typed language".

> http://msdn.microsoft.com/en-us/library/14cd3459%28VS.85%29.aspx

Getting warmer on that one. JScript is Microsoft's implementation of
ECMAScript.

Microsoft's documentation is fine for learning. It should be a first
stop for implementors who copy IE-only properties (they usually bungle
that, and in so doing, make standardizing and codifying such properties
even harder).

Keep in mind that it is fairly often misleading, often features
non-interoperable code (works in IE only).

It correctly states:
| You cannot explicitly declare data types in JScript.

And if you contrast that to what you wrote earlier:
| variable is of some certain type but this type can be changed to
| another one at runtime

Either variables have a type or they do not. Both cannot be true. It is
essentially a logical tautology.

The ECMAScript specification is the pertinent reference to answer that
question.

Bottom line: That link is not an authoritative reference for ECMAScript.

> http://www.java2s.com/Tutorial/JavaScript/0100__Number-Data-Type/Variablesarelooselytyped.htm
> see also: type coercion
>

Those references are not normative references on javascript. Regardless,
the tutorial seems to go against your claim of variables being typed by
stating:

| variables in JavaScript are not given a specific type.

Compare to what you first wrote:

| variable is of some certain type

> Strongly (statically) typed language
> http://www.computerhope.com/jargon/s/strolang.htm

At this point, it is unclear what (or if) you are trying to argue. You
seem full of hot air and have nothing valuable to say.

Such contributions to c.l.js detract from the quality of the NG.

They are detrimental to learning (it seems hard to believe that anyone
could find what you wrote useful, truthful, or valuable. At least a few
will read it.

You've contributed arrogance, misinformation, irrelevance.

Instead, you could have avoided doing that by either:
1) reading the pertinent specification
2) not partaking in the discussion
--
Garrett
comp.lang.javascript FAQ: http://jibbering.com/faq/
From: John G Harris on
On Sun, 1 Nov 2009 at 02:34:20, in comp.lang.javascript, VK wrote:

<snip>
>You know guys, at the run of one week you just killed me, really.
...
>But the discussion at "Implicit object constructor misinterpretation"
>and comments like here did force me to change my mind.
<snip>

You're just upset that no-one wants to believe your complicated and
incoherent description instead of our simple and clear version.

John
--
John Harris

From: VK on
John G Harris wrote:
> You're just upset that no-one wants to believe your complicated and
> incoherent description instead of our simple and clear version.
------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If that was a joke then a really good one - I admit it.

First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5
Prev: Limit of 4K
Next: Detecting Internet Explorer 6