In my opinion the dynamic-vs-static difference is more about the domain and usage. Infrastructure and large projects do better with static typing, but smaller and nimble-needing projects do better with dynamic.
The problem is that nobody yet knows how to make a language that can be both based on header/folder switches or what-not to tighten the bottom and loosen the top layers. Thus, we are kind of stuck choosing one or the other in order for lower-level parts to communicate easily with high-level parts.
I'd like to see more experiments in this area. If a language can master "chameleon typing", or perhaps chameleon strict-ness, then we don't have to globally choose anymore. If you pull it off, I'll personally recommend you for a Nobel Prize and/or a Turing Award. (Not that I have any pull, to be honest.)
All I know is when I use dynamic typing, bugs are more likely to be encountered at runtime. And languages that pretend to be statically typed aren't immune, like Java, where I've had to fix somebody else's code that crash and burned at runtime because they were making liberal use of Object everywhere, only casting it just before they used it (this also made it hell to debug.) Having static types makes debugging a lot less difficult.
And languages that pretend to be statically typed aren't immune, like Java, where I've had to fix somebody else's code that crash and burned at runtime because they were making liberal use of Object everywhere, only casting it just before they used it (this also made it hell to debug.) Having static types makes debugging a lot less difficult.
This is really more the fault of the programmer than language as it probably didn't have to be done that way. I was a grader for several (under)graduate classes, including programming classes, *way* back in my university days and believe me people can find a way to write dumb/bad/stupid code in any language -- especially when coding in one language, like LISP, using conventions of another language, like FORTRAN (for an actual example).
Perhaps because you are used to static languages? I get more "null object references" in static languages than in dynamic ones, so perhaps it's a trade-off.
The first thing they can fix is (Score:1, Troll)
... The stupid reliance on tabs to mark blocks.
Re:The first thing they can fix is (Score:2)
I think dynamic typing is more evil than tabs.
dynamic-vs-static "battle" (Score:4, Interesting)
In my opinion the dynamic-vs-static difference is more about the domain and usage. Infrastructure and large projects do better with static typing, but smaller and nimble-needing projects do better with dynamic.
The problem is that nobody yet knows how to make a language that can be both based on header/folder switches or what-not to tighten the bottom and loosen the top layers. Thus, we are kind of stuck choosing one or the other in order for lower-level parts to communicate easily with high-level parts.
I'd like to see more experiments in this area. If a language can master "chameleon typing", or perhaps chameleon strict-ness, then we don't have to globally choose anymore. If you pull it off, I'll personally recommend you for a Nobel Prize and/or a Turing Award. (Not that I have any pull, to be honest.)
Re: (Score:2)
All I know is when I use dynamic typing, bugs are more likely to be encountered at runtime. And languages that pretend to be statically typed aren't immune, like Java, where I've had to fix somebody else's code that crash and burned at runtime because they were making liberal use of Object everywhere, only casting it just before they used it (this also made it hell to debug.) Having static types makes debugging a lot less difficult.
Re: (Score:2)
And languages that pretend to be statically typed aren't immune, like Java, where I've had to fix somebody else's code that crash and burned at runtime because they were making liberal use of Object everywhere, only casting it just before they used it (this also made it hell to debug.) Having static types makes debugging a lot less difficult.
This is really more the fault of the programmer than language as it probably didn't have to be done that way. I was a grader for several (under)graduate classes, including programming classes, *way* back in my university days and believe me people can find a way to write dumb/bad/stupid code in any language -- especially when coding in one language, like LISP, using conventions of another language, like FORTRAN (for an actual example).
Re: (Score:1)
Perhaps because you are used to static languages? I get more "null object references" in static languages than in dynamic ones, so perhaps it's a trade-off.
Re: dynamic-vs-static "battle" (Score:2)
There is no such thing as null in Rust. The closest to it is Option, which the compiler forces you to acknowledge before you can do anything with it.
Re: (Score:1)
Rust has "none", which is another name for Null. It just forces one to supply a default if null for each context of usage, if I'm not mistaken.
Re: (Score:2)
Only a really bad programmer forgets what it put where.