M
M
Maxim Akhmerov2019-10-28 06:28:10
Programming
Maxim Akhmerov, 2019-10-28 06:28:10

What is the difference between static/dynamic typing and explicit/implicit typing?

if you go by the definitions, then explicit typing is when we explicitly set the type of a variable when it is initialized, and implicit typing is, respectively, var, let, and so on. Further, static typing is when the types of variables are determined at the compilation stage, and dynamic in the runtime. Tell me, as for me, these are the same things, if we explicitly set the type, this is static typing, if implicit it is let, var and the interpreter itself determines the type of the variable during execution. And is there an explicit dynamic and implicit static?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2019-10-28
@Rsa97

Explicit typing is a variant of static typing that requires you to explicitly declare the types of variables. With implicit static typing, the type decision is made by the compiler based on the data placed in the variable without an explicit type specification (auto in C++).

A
Alexander Skusnov, 2019-10-28
@AlexSku

if we explicitly set the type, this is static typing

Just the same for objects that have ancestors and descendants, dynamic typing at run time will decide which virtual method to call, despite the fact that the class was specified in advance.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question