On Wednesday, 15 June 2016 at 08:48:19 UTC, Chris wrote:
On Tuesday, 14 June 2016 at 21:23:38 UTC, Walter Bright wrote:
On 6/14/2016 11:55 AM, Dicebot wrote:
I find a typeless language convenient when it's less than one
screen in size. Their advantages fall away when things get
larger. I don't know how people cope with a large project in a
dynamic language.
In the long run the disadvantages of dynamic languages outweigh
the advantages. There is the issue of redefining variables and
values. It can introduce subtle bugs that are hard to find. You
spend a lot of time debugging stuff that would have easily been
caught in a static language.
Stuff like this is not uncommon:
`# example.py
name = "Walter"
print(name)
name = ["Walter"]
if len(name) == 1:
print("Your name has length 1")
`
This isn't related to dynamic typing. It is related to variable
assignment with implicit declaration and initialization.
Conceptually you would have the same problem in C++ and D since
they both use duck-typing (e.g. both overloading and templates
are essentially providing duck-typing).