... but I know somebody who does.
A question worth asking: why does Python have an "integer" type, but no "character" type? Especially when the serious users of numbers in python enhanced it, they did everything in terms of arrays.
Migration Report
1 day ago
4 comments:
I am trying to figure out how python would be a better language if it had a 'character' type.
I can not figure that out.
I'm saying the opposite - Python might be better if it did not have an 'integer' type :-).
Yeah, I wonder why that innovation of APL's never caught on? It's obviously unsuitable for C, whose whole point was that it mapped closely to assembly on common CPUs, but you'd think higher-level languages would have picked it up at relatively low cost. I'm not sure what the resulting language would look like, though.
Well, in Python, you type '"X"' and get (in effect) array('c', 'X', readonly=True). Why not type '5' and get array('i', [5], readonly=True) ? + could just as easily dispatch on the type of array, and give you the right thing for '3 + 4'...
It doesn't seem like it'd change the language that much in terms of daily usage, although I am sure there are lots of subtle details that would take a few weeks to hammer out.
Post a Comment