7 ms·
For context on this, check out PEP 492: https://www.python.org/dev/peps/pep-0492/ https://www.python.org/dev/peps/pep-0492/ It's a really exciting proposal. AF
by avolcano 11y ago
For context on this, check out PEP 492: https://www.python.org/dev/peps/pep-0492/ https://www.python.org/dev/peps/pep-0492/
It's a really exciting proposal. AFAIK, it'd make Python 3 the first mainstream imperative scripting language to have these async/await concepts built-in (there is a similar proposal for JavaScript/ES7 built on top of generators and promises[1]). While I've commented before about how asyncio is still a bit more nascent than I'd like, I'm really excited to see where the community takes it.
[1]: https://github.com/lukehoban/ecmascript-asyncawait https://github.com/lukehoban/ecmascript-asyncawait
- kyberias 11y agoIt would also make it the first programming language that starts with the letter P and ends with letter N to have those concepts. Seriously, why does it matter? Is Python 3 really a "scripting language"? I don't think so. It's fairly close to, for example, C#, that has had these particular concepts for a while now. As have many other languages. Again, I don't think it matters that much who was "first".
- avolcano 11y agoI don't think it matters who's first either; I'm just excited that Python's one of the first languages to implement these concepts beyond C#. Only used the term "scripting language" as a way to say "lighter-weight."
- kbar13 11y agoto be fair python3 is a pretty large distribution (by filesize and features), and it requires having the python interpreter to run code.
- Rapzid 11y agoAnd a minimal working mono distro is pretty small.
- balls187 11y agoI don' think you're making your point effectively. "It's exciting that Python is embracing these features." That's really what you're trying to hit home.
- wldcordeiro 11y agoAn exciting thing that's happening here is that this adds another thing to Python 3 that is enticing to developers. There's been a lot of great improvements to the language in the 3.x line and the more things to lure people away from 2.x the better.
- abecedarius 11y agoCounterpoint: I'm already uneasy about how complex the language has gotten. I like asyncio in principle, but here we see that addition spawning another addition.
- BuckRogers 11y agoWhat other option do they have to try to draw people over to Python3 that isn't a lot of work? I agree though. It's a kitchen sink rather than a smartly designed, concise language. I like to keep up on goings-on, but I work in a Python2 shop, I don't foresee myself or our business ever using Python3. While I love Python2, my Python3 will be Go. I like that Go is not a kitchen-sink language. I've also learned more from it, and I believe it adds more to my skillset and resume than Python3 ever will. That's my plan at least, to stop using Go just for fun, stop using Python for daily work, and use Go for fun and daily work. That's when the time comes that Python2 is no longer relevant and doesn't have the library support it enjoys today. I expect 2.7 library support to last a very long time.
- lqdc13 11y agoGo unfortunately doesn't have all the awesome Python libs.
- BuckRogers 11y agoThis is true, but hopefully by the time Python library maintainers drop 2.7 support, the Go space will be more than ready. Should be plenty of time for that to happen. There's probably a few decades of 2.7 library support, given the stats I've seen show 3.x at 10-17% of the userbase. Even if that doubles in 5 years (won't happen), it'll still be ~34% on Python3. Which is so long from the 2008 Python3 launch date, and a small enough number migrating that we can effectively concede these are two separate communities going forward.
- skybrian 11y agoDart has async/await. I'm not sure if it counts as mainstream, but it's well-known and it's an imperative scripting language. Still, nice that Python will have it.
- tmc2 11y ago> the first mainstream imperative scripting language to have these async/await concepts built-in Hi. https://www.dartlang.org/articles/beyond-async/ https://www.dartlang.org/articles/beyond-async/
- deleted 11y ago[deleted]
- cwyers 11y agoI don't know that the definitional argument is worth having, but Python is more mainstream than Dart by a good deal.
- tmc2 11y agoI didn't realize factual corrections need to be cleared by a committee that decides which languages matter. ("More mainstream" is a moving goalpost fallacy.)
- wtallis 11y agoWould you care to propose an objective criterion by which Dart is within an order of magnitude of the popularity or prevalence of Python?
- munificent 11y agoThat depends on if you define "mainstream" to mean "lots of users" or "similar to the kinds of things with lots of users". If I write songs that sound like Taylor Swift but no one knows who I am, do I make "mainstream" music? Personally, I would say yes.
- pandler 11y ago> If I write songs that sound like Taylor Swift but no one knows who I am, do I make "mainstream" music? Personally, I would say yes. You might make mainstream music but you yourself are not mainstream.
- milroc 11y agohack (PHP by Facebook) has it. Though not mainstream. Also some companies have forked python to support coroutines themselves (http://ironport.github.io/shrapnel/index.html http://ironport.github.io/shrapnel/index.html).
- pekk 11y agoWhat is the point of the community taking this anywhere when it is likely to be superseded by something else soon? It wasn't really that long ago that we got the original coroutines PEP and "yield from," now they are being obsoleted in favor of something that isn't clearly better.
- anonymoushn 11y agoLua has a more general thing that is maybe comparable to Greenlet. Maybe it's not mainstream or not exactly the same feature though.