Dynamic languages ​​Vs Static languages ​​(can these two be together in the same place)

Programming languages

grouped into 2 main classes "Dynamic" and "Static". - It is always the case that the programming language is in one of them, and not both, I mean, can the language be dynamic and static at the same time?

+3
source share
5 answers

The difference between static and dynamic language is rather ambiguous, since it can relate to many different (more or less suitable) criteria. I will try to answer for each case:

Interpretation / Compilation

, . , .

  • Haskell (GHC/GHCI/Hugs)
  • ++ (g++/Ch)
  • F #

(.NET).

/

( ) . . # dynamic, VB Explicit/Strict off Boo. . (System.Object) - , .

- (, , )

Java .NET.

(, , )

. . Haskell Scala.

+4

# 4.0 - , . dynamic : . , .

+4

Objective-C - . C, C . "" ( , id). Objective-C, , id. , NSArray id, :

NSMutableArray *a = [NSMutableArray arrayWithObject:@"I am a string"];
NSNumber *n = [a objectAtIndex:0]; //assigning a string to a number!

NSNumber *n = @"I am a string" .

+2

. , .

#, , System.linq.Expression tree API VS 2010 (.NET 4.0). DLR (Dynamic Language Runtime) - CLR.

, expression class, , IronPython ..

, python CLR. , DLR.

+1

?

. , , , , . "", REPL, . , F # - , . /.

Therefore, I suppose that a language can be both dynamic and static. In particular, by checking statically type and supporting interactive evaluation.

0
source

Source: https://habr.com/ru/post/1723967/


All Articles