Not completely. I was blending bits of strong, static and safe. But for example:
a = 20
b = 1
c = a + b
What will the result be? An int? A byte? A float? Python doesn't care, it's all an int, or a float if there's a decimal point. It will only catch egregious errors as you mentioned. I'm not a Python expert, so correct me if I'm wrong.
As far as dynamic typing, it's also bad for beginners. It lets them play too fast and loose. Thus we get a lot of code jockeys who don't really know how to program.
This looseness is also what I hate about Visual Basic and most other scriptable languages. Sure it lets you prototype faster, but there's a lot more to programming than the prototype. This is my main complaint in my recent foray into Objective C. I like the strong, static, safe, nominal typing of c#. But then I'm a control freak when it comes to programming.
Python can tell you
>>> a = 20 >>> b = 1 >>> c = a + b >>> type(c) <type 'int'>
Python doesn't care, it's all an int, or a float if there's a decimal point.
No decimal point required:
>>> a = float(2) >>> type(a) <type 'float'> >>> print a 2.0
This looseness is also what I hate about Visual Basic and most other scriptable languages. Sure it lets you prototype faster, but there's a lot more to programming than the prototype. This is my main complaint in my recent foray into Objective C. I like the strong, static, safe, nominal typing of c#. But then I'm a control freak when it comes to programming.
But you're okay with this behavior?
main() { char a[] = "When in the Course of human events " "it becomes necessary for one people to " "dissolve the political bands which have " "connected them with another"; char b, *c; b = 'a'; c = a + b; printf("%s\n", c); } # gcc test.c # ./a.out bands which have connected them with another
Just so you know, C# has duck typing.