However, other dynamically typed languages like Python, php and to a
lesser extent Perl do not have anywhere near as sane a system. I
suspect that the Smalltalk equivalent of the following Python code
might actually do the right thing:

   a = [ 1, "help" ]
   b = a + 10

but Python squeals like a stuck pig (read runtime error).


So it should ... just because a language is made for the ease to use does not
mean it should just accept any random input and not to complain.

b = a + 10 isn't exactly  programmingly intuitive, it could potentially mean:

I) b = [l, "help", 10]

II) (if l is of type int) b = [l+10, "help"]

III) b is the address of a plus 10 units.

yiz







--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to