weakly-typed

(strongly vs weakly) typed AND (statically vs dynamically) typed languages and Moore's law [closed]

…衆ロ難τιáo~ 提交于 2019-12-13 03:06:50
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I do not know how many faces this problem. If I do programming in weakly/dynamically typed language like python,php,javascript for few days I lose touch with strongly typed languages like c++,Java,.net. I recently heard languages like python and ruby which people loved programming in. It is very easy programming

Is checking for true explicity bad by design?

吃可爱长大的小学妹 提交于 2019-11-28 20:29:47
Is it considered bad to explicitly check for the boolean true. Would it be better to do a simple if(success) ? I've seen various jokes made about how if (someBoolean === true) is horrible code in a strongly typed language but is it also considered bad in weakly typed languages? This would apply for any weakly typed language that does type coercion on an if statement. A specific example would be : var onSuccess = function (JSONfromServer) { // explicitly check for the boolean value `true` if (JSONfromServer === true) { // do some things } } // pass it to an ajax as a callback doSomeAjax

Is checking for true explicity bad by design?

寵の児 提交于 2019-11-27 13:11:19
问题 Is it considered bad to explicitly check for the boolean true. Would it be better to do a simple if(success) ? I've seen various jokes made about how if (someBoolean === true) is horrible code in a strongly typed language but is it also considered bad in weakly typed languages? This would apply for any weakly typed language that does type coercion on an if statement. A specific example would be : var onSuccess = function (JSONfromServer) { // explicitly check for the boolean value `true` if

Is C strongly typed?

橙三吉。 提交于 2019-11-26 15:45:27
To quote Wikipedia : Two commonly used languages that support many kinds of implicit conversion are C and C++, and it is sometimes claimed that these are weakly typed languages. However, others argue that these languages place enough restrictions on how operands of different types can be mixed, that the two should be regarded as strongly typed languages. Is there a more definitive answer? Norman Ramsey "Strongly typed" and "weakly typed" are terms that have no widely agreed-upon technical meaning. Terms that do have a well-defined meaning are Dynamically typed means that types are attached to

Seeking clarification on apparent contradictions regarding weakly typed languages

我只是一个虾纸丫 提交于 2019-11-26 15:37:01
I think I understand strong typing , but every time I look for examples for what is weak typing I end up finding examples of programming languages that simply coerce/convert types automatically. For instance, in this article named Typing: Strong vs. Weak, Static vs. Dynamic says that Python is strongly typed because you get an exception if you try to: Python 1 + "1" Traceback (most recent call last): File "", line 1, in ? TypeError: unsupported operand type(s) for +: 'int' and 'str' However, such thing is possible in Java and in C#, and we do not consider them weakly typed just for that. Java

How are JavaScript arrays represented in physical memory?

与世无争的帅哥 提交于 2019-11-26 05:27:14
问题 It is my understanding that I can store mixed data in a JavaScript array, as well as change any element in the array to some other type. How does the interpreter keep track of what place in physical memory any element is at. Also how is the overwriting of the data in the next element prevented if I change an element to a larger data type. I assume that arrays only store references to actual objects, and primitives are wrapped behind the scenes when placed in arrays. Assuming this is the case,

Is C strongly typed?

陌路散爱 提交于 2019-11-26 04:36:19
问题 To quote Wikipedia: Two commonly used languages that support many kinds of implicit conversion are C and C++, and it is sometimes claimed that these are weakly typed languages. However, others argue that these languages place enough restrictions on how operands of different types can be mixed, that the two should be regarded as strongly typed languages. Is there a more definitive answer? 回答1: "Strongly typed" and "weakly typed" are terms that have no widely agreed-upon technical meaning.

Seeking clarification on apparent contradictions regarding weakly typed languages

两盒软妹~` 提交于 2019-11-26 04:34:28
问题 I think I understand strong typing, but every time I look for examples for what is weak typing I end up finding examples of programming languages that simply coerce/convert types automatically. For instance, in this article named Typing: Strong vs. Weak, Static vs. Dynamic says that Python is strongly typed because you get an exception if you try to: Python 1 + \"1\" Traceback (most recent call last): File \"\", line 1, in ? TypeError: unsupported operand type(s) for +: \'int\' and \'str\'