hi. I'm not a programmer or anything. I just know some PHP and the obligatory web developer bullshit. is Python a good language for a non programmer like me to start with? what's your expert opinion on this lang.?
thank you!
Name:
Anonymous2010-09-26 4:30
Dynamic typing means you waste less time defining stuff, and stuff you did for some purposes just magically works for some other purposes you may want to give it later on, without having to inherit or implement whatever object-oriented bullshit. For example:
def dup(x):
return x + x
You may have thought out that for numbers, yet it also works for strings and lists, and if you later implement another collection type supporting __add__, it'll also work there. Time wasted defining types: 0.
Name:
Anonymous2010-09-26 23:20
>>25
That is the dumbest argument for duck typing I have ever seen in my life.
Not to mention the fact that you can do it in statically typed languages too. Like Haskell.
dup x = x + x
Incidentally, even though the Haskell version requires less typing, it will also check at compile time to ensure that you don't pass it a type that doesn't have an implementation for +.