Re:Are dynamic languages going to replace static languages? ...
by kaba0 on Wednesday August 04, 2021 @05:47AM
(#28059106)
How many ways can you call a single function? Like, it may be called from a loop, with a quickly changing variable that may change type here or there (especially with weak typing), and you really can’t just say that “I tested it with this one data and it worked”.
Re:Are dynamic languages going to replace static languages? ...
by kamaal on Thursday August 05, 2021 @11:04AM
(#28074730)
Most people generally use one variable for one purpose.
Of the all the constraints I've faced while developing software, reusing variables for many purposes in one code block isn't one of them.
Re:Are dynamic languages going to replace static languages? ...
by majjgepolja on Wednesday August 04, 2021 @04:59AM
(#28058795)
The main advantage of typing is, for me, IDE showing errors as you type and better autocomplete, and they serve as documentation also (Of course you should read docs but types are helpful as quick reminder.)
Maybe I am just more absent minded than most dynamic programmers, but live IDE diagnostics and autocomplete are very important for me.
Re:Are dynamic languages going to replace static languages? ...
by kamaal on Thursday August 05, 2021 @11:05AM
(#28074742)
Don't we have support for most of this in language plugins for Python in vscode et al, already?
Re:Are dynamic languages going to replace static languages? ...
by majjgepolja on Saturday August 07, 2021 @07:29AM
(#28097741)
It's not as accurate or satisfactory in my experience. For example I get errors after running in python, which could be detected in statically typed languages while typing in IDE. Autocomplete is also less than optimal. As for autocomplete intellij IDEs > LSPs for typed languages > Untyped languages IME.
I never understood this, how is it possible that a developer calling a function doesn't test if they are calling it right. Once they test it, how does the additional compiler test matter?
Unless of course your calling function is mutating the value of a variable across so many types that it's impossible to realistically test it. It would then make sense to use a type to prevent the variable from being something it shouldn't.
But most people, don't have that situation most of the time. Even in a big application.
May be that explains why something like Python has such wide adoption.