Python is DOOMED! Again!

Rustom Mody rustompmody at gmail.com
Fri Jan 23 00:06:52 EST 2015


On Friday, January 23, 2015 at 9:23:11 AM UTC+5:30, Chris Angelico wrote:
> On Fri, Jan 23, 2015 at 2:11 PM, Rustom Mody wrote:
> > 1. [1,2,3] + [4,5,6]
> > uses the same symbol for an unrelated operation
> > 1 + 4
> 
> They're not unrelated operations. Maybe in the purity of mathematics
> they're distinct, but in the practical world of "getting-stuff-done
> programming", they're the same operation, as is string concatenation.
> It makes perfect sense to use the same symbol for all of them.
> 
> ChrisA

You are conflating 3 things of which two are logically related --
string, list, number

String and list are the same
In python they are both iterable
In classic Haskell they were literally the same
"abc" is equivlent to ['a', 'b', 'c']
[Modern Haskell has confused the issue by adding a menagerie of types
for efficiency reasons]

As for string and number how is
"1" + "2" == "12"
related to
1+2 == 3
??



More information about the Python-list mailing list