On Wednesday, 15 June 2016 at 09:09:42 UTC, Ola Fosheim Grøstad
wrote:
This isn't related to dynamic typing. It is related to variable
assignment with implicit declaration and initialization.
But this is part of the definition of a dynamic language, isn't
it?
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).
But factually I don't:
`
import std.stdio;
void main()
{
auto name = "Walter";
writeln(name);
name = ["Walter"];
}
`
Error: cannot implicitly convert expression (["Walter"]) of type
string[] to string