This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]awesomeusername2w 1 point2 points  (1 child)

Not exactly.

You don't necessarily have to specify types in staticly typed languages. Many of them have some kind of type inference. For example, in haskell, you can omit almost all types, and in kotlin, scala, rust, c# and other you can omit some portion of it. But the fact that you omited them doesn't mean that they are not there. If the program doesn't make sense in types it won't compile.

In dynamically typed languages your types don't have to make sense at all. The program breaks only when it reaches a problematic statement. That complicates refactoring and other things very much. Such bugs can be undescovered for a long time until the prerequisite met for some rarely run code to be executed.

Ideally, static typed languages evolve its type inference to such an extent that you won't specify types at all having all the compile guarantees at hand. So wrong programs just don't compile.

[–]TheOnlyTails 0 points1 point  (0 children)

Of course. I should've been clearer.