3 ms·
Why doesn't anyone seem to think the full number tower in python 3 is great? It seems to always be left out of discussions like this ... but I think it is a gre
by e12e 12y ago
Why doesn't anyone seem to think the full number tower in python 3 is great? It seems to always be left out of discussions like this ... but I think it is a great and very "pythonic" thing to add to the language.
[edit: because the numeric tower wrt integers wasn't new in python3, just other parts of the number hierarchy... see below]
In that light I think unicode also makes more sense: text is text and numbers are numbers. Done. No need to think about it.
Yes, it does break with python2 -- but python2 isn't going anywhere.
As for the GIL -- is it really such a big deal any more? I know that forking processes on Windows used to be hopelessly slow -- maybe it still is? But it's been pretty lightweight on Linux for the longest time -- and as we're getting more and more (logical and physical) cores -- with all the cache-coherency issues that come with it -- isn't multiprocess a pretty sane programming model?
Yes, a solid actor framework would be nice -- but that would also mandate some form of change to python.
If there's something I'd like to see, it's a clean interface between rust and python (rather than having to fall back to c for high performance code).
But I don't understand the people that hold up Go as the terrible threat to python -- sure there are a lot of people that will move from one to the other -- but the languages are so different that the comparison really doesn't make any sense. The one thing they do have in common is a strong vision and focus on simplicity -- but they articulate that vision and focus quite differently.
For those that want "faster" python -- why not use nimrod? If you want something "faster" and "more embeddable" why not use lua? I can't see a good pythonX that is better at either of these two in the areas where they excel. If you want actors, why not use Elexir?
Personally I'd probably enjoy a Smalltalk/Strongtalk that had a slightly more complicated syntax than traditional Smalltalk -- borrowing from python (say indentation for blocks, some way to define infix messages/operations) -- but I'm not under any illusion that such a language would be a better python.
- mark-r 12y agoNo matter how fast the OS can spin up another process, you still have to contend with the overhead of Python initialization itself. And I don't quite understand what you mean by the "full number tower".
- e12e 12y ago> No matter how fast the OS can spin up another process, you still have to contend with the overhead of Python initialization itself. Good point... but isn't part of that possible to reduce a little when python itself forks? I've not looked at the code, that might very well not be what happens when you use the multiprocess-module? > And I don't quite understand what you mean by the "full number tower". I was thinking of: http://legacy.python.org/dev/peps/pep-3141/ http://legacy.python.org/dev/peps/pep-3141/ but apparently confused as to what had changed in python3 (mostly the change to division/true division -- which I still think is more pythonic, but less of a change than I thought). So eg: $ python2 -c "print(1/2)" 0 $ python3 -c "print(1/2)" 0.5 But I also thought there might be some differences wrt doing stuff like: $ python -c "print(2**10000)" 19950(...)9376 But there isn't :-)
- maxerickson 12y agoIn 2.x, ints and longs are separate types. It's largely transparent though.