TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Python has brought computer programming to a vast new audience

252 点作者 leonagano将近 7 年前

26 条评论

riazrizvi将近 7 年前
The thing I love most about the language is its conciseness, on several levels.<p>It&#x27;s syntactically concise because of its use of whitespace and indentation instead of curly braces.<p>Expressions are often concise because of things like list slicing and list expressions.<p>It can be linguistically concise, because it is so easy to fiddle with the data model of your classes, to customize their behavior at a deeper level. For example, it is so quick to design a suite of classes that have algebraic operators, which leads to elegant mathematical expressions of your custom GUI objects for example. But you can also change the way classes are instantiated by overriding Class.__new__ which I&#x27;ve used to make powerful libraries that are a joy to use.<p>Further elegance can be added through creative use of the flexible argument passing machinery, and the lovely way that functions are also objects.<p>Your application architecture tends to be concise because there are so many existing libraries, you can often design your application at a more interesting higher level. For example, you don&#x27;t have to worry about the size of int&#x27;s.<p>My big regret with Python 3.0 is that the scoping rules in list expressions changed to prohibit modification of variables in surrounding scope. This degraded the utility of list expressions. The work around is so long-winded.<p>Besides the odd gripe here and there, the language really gives me a warm glow.
评论 #17570400 未加载
评论 #17570592 未加载
评论 #17630565 未加载
评论 #17570962 未加载
评论 #17570389 未加载
评论 #17570537 未加载
评论 #17571609 未加载
danso将近 7 年前
&gt; <i>But in the past 12 months Google users in America have searched for Python more often than for Kim Kardashian, a reality-TV star.</i><p>This seemed so unlikely that I thought the Economist had incorrectly used the Google Trends comparison tool, but they are right:<p><a href="https:&#x2F;&#x2F;trends.google.com&#x2F;trends&#x2F;explore?geo=US&amp;q=%2Fm%2F05z1_,%2Fm%2F0261x8t" rel="nofollow">https:&#x2F;&#x2F;trends.google.com&#x2F;trends&#x2F;explore?geo=US&amp;q=%2Fm%2F05z...</a><p>The gap is even bigger when you consider a worldwide audience (i.e. one less focused on American gossip):<p><a href="https:&#x2F;&#x2F;trends.google.com&#x2F;trends&#x2F;explore?q=%2Fm%2F05z1_,%2Fm%2F0261x8t" rel="nofollow">https:&#x2F;&#x2F;trends.google.com&#x2F;trends&#x2F;explore?q=%2Fm%2F05z1_,%2Fm...</a>
评论 #17570647 未加载
评论 #17570691 未加载
lordnacho将近 7 年前
Someone else said this on HN: Python is the second best language in almost every field of computing.<p>That&#x27;s why there&#x27;s a library for everything in Python.<p>It&#x27;s limitations are also not terrible for most people. If you want super fast, you will know how to do that some other way. If you just want simple and easy to read, you use Python.
评论 #17571705 未加载
评论 #17571292 未加载
评论 #17583566 未加载
KirinDave将近 7 年前
Read the comments here. Look at the diversity of opinions and the number of them that, while professing love for Python, directly contradict each other. Python is verbose|concise, simple|advanced, disciplined|experimental, modern|classical.<p>It goes to show: something doesn&#x27;t need to be actually-better. It doesn&#x27;t need to be actually-simpler. It doesn&#x27;t need to make your job easier or better. It needs to make people <i>think</i> it does that.<p>Python is not, in any way, revolutionary. Several contemporaries exist with similar design constraints. But Python persists because it&#x27;s created a community that considers itself hygienic for avoiding any other aspect of programming. And by doing this, it can be superlative in any aspect it wants to be. It simply conjures the worst example from any given competitor and those are, by proxy, pushed onto all of them.<p>Did we see a glowing review of how Javascript did this? No. Javascript, despite being the most deployed programming environment family in human history, didn&#x27;t do this. Python did. Because it says so, over and over.<p>Even if you disagree with that assessment, I think Python has had a lot less to do with pushing python to new audiences. Its community has projected it outward with an impressive degree of vigor over the years, forcing it on more and more people.
评论 #17570611 未加载
评论 #17575155 未加载
评论 #17570498 未加载
评论 #17570922 未加载
评论 #17571176 未加载
评论 #17570833 未加载
评论 #17570670 未加载
评论 #17573999 未加载
评论 #17570977 未加载
评论 #17572521 未加载
throwaway5752将近 7 年前
I remember <i>hating</i> the whitespace thing so much when I started with Python circa 2.4, but have really come to love the language in a lot of domains since then.<p>A huge, huge &quot;thank you&quot; to Mr. van Rossum for creating this quirky language that I&#x27;ve become so fond of and for the countless hours of his life he&#x27;s given to the project.
评论 #17570153 未加载
评论 #17570814 未加载
评论 #17572814 未加载
dfee将近 7 年前
There seems to be a sentiment that Python is a kids language - but I think of Python as a language that scales with your experience. You can do some really interesting and complex things and I’m really appreciative of my deep understanding of the language through a decade of heavy use, open source contribution, and project ownership.<p>Recently I released a package which allows you to dynamically create or change function signatures and went deep into `typing` and `inspect`, and found the experience rewarding.<p><a href="https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;python-forge&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;python-forge&#x2F;</a>
评论 #17570616 未加载
评论 #17571177 未加载
评论 #17572144 未加载
andreygrehov将近 7 年前
For some reason, I never liked Python. I don&#x27;t know... its classes look weird with all those self, __init__, etc. The __init__.py for packages is also a strange choice to me. It has classes, but no interfaces. The language is even slower than PHP. Does Python have type hinting? What all the hype is about? I just don&#x27;t get it.
评论 #17571208 未加载
评论 #17570613 未加载
评论 #17570965 未加载
评论 #17570451 未加载
random_upvoter将近 7 年前
For me it&#x27;s somewhat strange that it is universally presented as a beginner&#x27;s language. Python would be hugely confusing to me if I didn&#x27;t keep the underlying C model -- dynamically allocated objects with reference counts -- in mind at all time. Together with a lot of protocol that is largely arbitrary.
评论 #17570258 未加载
评论 #17570409 未加载
评论 #17570321 未加载
评论 #17570659 未加载
评论 #17570629 未加载
评论 #17570426 未加载
mockingbirdy将近 7 年前
Am I the only who thinks that &quot;90% of American parents want their kids to be computer scientists&quot; is rather unsettling?<p>The market is currently full of people who are in for the money and will continue to be. It will be filled with people until supply meets demand. That the salaries will drop significantly is a natural result of this.<p>We had this pork cycle for teachers, doctors and other highly trained people. No one is benefitting from too many people who drive the prices down (although I&#x27;m not gonna say something as an employer, companies are happy about it - the profit margin will shrink but this can be compensated for using scaling). Those that are in for the money will leave (or continue to suffer in an unfulfilling job) and those that have passion can&#x27;t sustain themselves (we can see this trend in indie game development today).
评论 #17570984 未加载
评论 #17570878 未加载
评论 #17571048 未加载
评论 #17570571 未加载
lainproliant将近 7 年前
Not only is Python easy to learn for beginners, it allows for some deeply expressive constructs and patterns that are difficult or impossible in other languages. This is why even though I started with C&#x2F;C++ and Java pays the bills, Python is where my heart is. Thanks Guido.
评论 #17570436 未加载
sputknick将近 7 年前
Very appropriate timing. My son wanted to learn programming, so we started yesterday with python, using Jupyter notebooks on Azure (notebooks.azure.com). No setup, easy to create little code snippets, and he can do it all from his Chromebook. Python is intuitive, simple, useful; best first language in my opinion.
ucarion将近 7 年前
In case anyone else was confused by the literary reference, &quot;one with Nineveh and Tyre&quot; is from Kipling&#x27;s &quot;Recessional&quot;:<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Recessional_(poem)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Recessional_(poem)</a><p>Which, I think, is the poem that made &quot;lest we forget&quot; a well-known phrase (though the original is from the Bible).<p>Nineveh (now Mosul, Iraq) and Tyre (in Lebanon) were great cities of their time, but now mostly known for their ruins. In Britain, they&#x27;re commonly used as symbols of foregone empires.
pm90将近 7 年前
Python is a great language to start programming in. My biggest frustration with traditional programming languages (well, C&#x2F;Java mostly) was just how much upfront effort and understand is required to do useful stuff. Whereas with python it is pretty easy to whip up a script, read input and transform it into output in real time etc.<p>That said, I think its also important for Python programmers to dabble at least a little bit with Java to really understand how OOP works. Python does have OOP but it has certain quirks which can confuse newcomers. Java helped to clarify my understanding of OOP a lot, even though I&#x27;ve only used it marginally.
评论 #17570308 未加载
评论 #17571128 未加载
评论 #17573604 未加载
评论 #17571727 未加载
评论 #17570301 未加载
siddboots将近 7 年前
I think this comparison [1] in particular explains a lot of Python&#x27;s continued success over the past 5-10 years. For a very long time, CRUD back-end programming was one of the biggest draws of new users to Python. In the last couple of years, interactive data analysis has completely overtaken it.<p>[1] <a href="https:&#x2F;&#x2F;trends.google.com&#x2F;trends&#x2F;explore?date=all&amp;geo=US&amp;q=%2Fm%2F06y_qx,%2Fm%2F0rphppq" rel="nofollow">https:&#x2F;&#x2F;trends.google.com&#x2F;trends&#x2F;explore?date=all&amp;geo=US&amp;q=%...</a>
elorant将近 7 年前
The great advantage of Python is the vast amount of libraries out there for pretty much anything you can think of. As a C# developer that&#x27;s the one thing, and probably the only, that I envy from Python.
评论 #17570315 未加载
评论 #17570163 未加载
taeric将近 7 年前
This seems misspoken. Python hasn&#x27;t necessarily brought computer programming to a new audience. A new audience is being brought to computer programming. They just happen to be given python as their first steps.<p>There is nothing intrinsic to python that is helping these use cases. Some people like it. Some people don&#x27;t. I have not seen studies showing any real advantage or disadvantage to it. Do those exist, and I&#x27;ve just missed them?
评论 #17571536 未加载
oh-kumudo将近 7 年前
Python&#x27;s core strength, among the half dozen of language I used in daily work, is that it is simple and focus on easy human expressiveness.<p>It is the best example of &#x27;simple is hard&#x27; when done right. Its core abstractions are carefully selected and weaved in a way, using them to organize&#x2F;orchestrate your thoughts is just natural and fluid.<p>Huge thanks to Guido for presenting the world such a meticulously crafted work.
ufo将近 7 年前
The Brian analogy was a surprisingly apt way to explain the PEP 572 kerfuffle
kankanaads786将近 7 年前
It&#x27;s really interesting. I am a beginner to python an just read the above article. it&#x27;s really interesting and I too enjoy coding with python.
SilverSlash将近 7 年前
I just love Python. It&#x27;s my favorite programming language for many reasons but one of them is writing python never feels like the language is working against you. Python always feels like it&#x27;s helping you.
drpgq将近 7 年前
Python is certainly way better for a layman trying to do small things than C++
评论 #17570120 未加载
timb07将近 7 年前
Nice reference to Karel Čapek&#x27;s &quot;R.U.R.&quot; (<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;R.U.R." rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;R.U.R.</a>).
MarkMMullin将近 7 年前
To me, Python has represented the nice friendly face one can put on the mean nasty stuff written in C++
devin将近 7 年前
<p><pre><code> python -c &quot;import this&quot;</code></pre>
yontherubicon将近 7 年前
Archive link for losers like me who can&#x27;t get past the paywall: <a href="http:&#x2F;&#x2F;archive.is&#x2F;8mRZ0" rel="nofollow">http:&#x2F;&#x2F;archive.is&#x2F;8mRZ0</a>
vgy7ujm将近 7 年前
Meh.. try Perl.
评论 #17570370 未加载
评论 #17570235 未加载