-1

If a program is not completely statically compiled then is it weakly typed or strongly typed

cuddle
  • 75
  • 1
  • 2
  • 5

4 Answers4

1

Apples and oranges. Assembly language programs are statically compiled, but you can use any variable as a character, as an integer, as part of a float, or as part of a JPEG image. Typing is separate from any concepts about compilation or interpretation.


Now that I think about it, I can't think of an interpreted language offhand that isn't strongly typed, but that still doesn't mean there's any connection.
Thought of one. Brainf*ck. It's interpreted and has no concept of types at all.
jcomeau_ictx
  • 37,688
  • 6
  • 92
  • 107
0

A language is strongly typed if it contains compile-time checks for type constraint violations. If checking is deferred to run time, it is weakly typed.

Have a look at this link :

Also, you don't want to miss this discussion by Bill Venners with Frank Sommers

Some more good reads.

Community
  • 1
  • 1
Saurabh Gokhale
  • 53,625
  • 36
  • 139
  • 164
0

Don't confuse the distinction between strong and weak typing with the distinction between static and dynamic typing. And none of these is the same as dynamic compilation, dynamic linking, dynamic loading, or dynamic dispatch.

As usual, Wikipedia offers a pretty good starting point.

Caleb
  • 124,013
  • 19
  • 183
  • 272
-1

"A language is strongly typed if it contains compile-time checks for type constraint violations. If checking is deferred to run time, it is weakly typed."

Not exactly. What you're describing here is more relevant to the difference between dynamic and static typing.

A language is strongly typed if it prevents the success for operations on arguments which have the wrong type. Now this could happen either at compile type or run time.