by jpr · 16y ago · 0 comments
And I don't really buy the argument that Python is simple and clean. It has multiple inheritance, metaclasses, operator overloading, decorators and whatnot. Also the type system is broken, a deriving class can define an overriding method that has incompatible signature, rendering isinstance powerless (yes, I know you probably shouldn't use isinstance much anyway, but dammit, it should at least mean something).
Yes, but consider the competition. Python is a significant margin above average, but this says as much about the sorry state of computer languages in general as it says about Python.
Heck, English is considered an "easy to learn" language among human languages, and it's a mess!
Really the problem is with human beings.
(define x 3)
(let ((x 38))
(display x)
(newline))
38
Actually, you probably meant that this doesn't work: (define x 3)
(begin (define x 38)
(display x)
(newline))
38
(display x) (newline)
38 ; we want 3 here
EDIT: fix formatting def f():
x = 1
def g():
x = 2 # creates new local variable x
# no way to assign new value to x in enclosing scope!I view this as a benefit - less accidental stamping on variables/etc. I wouldn't consider myself A+ #1 programmer by any stretch though. This sort of thing seems like it would enable too many 'side effects' though.