TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

[Python-ideas] List Revolution

118 pointsby telemachosover 13 years ago

12 comments

famousactressover 13 years ago
Guido admits this is a joke later in the thread:<p><i>(And to those taking the thread seriously: this is all in jest. We won't change the indexing base. The idea is so preposterous that the only kind of response possible is to laugh with it.)<p>--Guido</i><p><a href="http://mail.python.org/pipermail/python-ideas/2011-September/011462.html" rel="nofollow">http://mail.python.org/pipermail/python-ideas/2011-September...</a>
评论 #2981733 未加载
评论 #2981730 未加载
LeafStormover 13 years ago
Roberto Ierusalimschy has an interesting perspective on the zero vs. one concept:<p>"Because <i>people</i> count from one, not zero.<p>We do that in kindergarten, in music, when starting a race, when drawing up an agenda, everywhere. One, two, three, etc have their counterparts in every known language on earth.<p>Zero, on the other hand, is an advanced concept. Humanity could prove that sqrt(2) is not a rational number centuries before anybody thought that a symbol for zero might be useful.<p>A harder question would be "why do arrays in some other languages count from zero not one?" The answer for C is a good one: "so that * (A+k) and A[k] mean the same". For Python, the answer seems to be "because it's that way in C"."<p>And:<p>"Currently, many languages are 0-based due to influence from C. Ironically, none of them share the reason that made C 0-based (where a[e] means * (a+e))."<p>(EDIT: I had to add spaces after the stars to prevent HN from italicizing a huge block of text.
评论 #2981735 未加载
评论 #2981602 未加载
评论 #2981817 未加载
评论 #2981873 未加载
评论 #2981802 未加载
tkaemmingover 13 years ago
The Dijkstra transcript referred to a bit deeper in the thread about why sequence numbering starts at zero is a tangentially interesting read: <a href="http://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html" rel="nofollow">http://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EW...</a>
评论 #2981244 未加载
pyreover 13 years ago
Good news! You can have this right now in Perl:<p><pre><code> $[ = 1; </code></pre> Now all of your arrays are 1-indexed!
评论 #2981028 未加载
评论 #2981077 未加载
评论 #2980980 未加载
sixtypoundhoundover 13 years ago
He's joking right - I almost spit out my diet coke... (oh yeah...I'm sure THAT will accelerate my group's upgrade from 2.66....)
makeramenover 13 years ago
woah.<p>(not to post something useless, but I'm literally speechless going back and forth between "that's so awesome" and "that's so dumb" in my head for so many different reasons)<p>(and at how short and quick Guido's response was, as if it was such an easy decision to make.)
评论 #2980916 未加载
sagarunover 13 years ago
<i>Well, given Guido's endorsement, I think we need to change how these +1/-1 votes work. Clearly, +1 means what +0 used to mean. So you have to say +2 to vote in favor of something and -0 to vote against. I know it will be confusing during the transition period but it will be so much easier to use when we are done.</i><p>Loved this response <a href="http://mail.python.org/pipermail/python-ideas/2011-September/011454.html" rel="nofollow">http://mail.python.org/pipermail/python-ideas/2011-September...</a>
briancurtinover 13 years ago
First time I've laughed from a Python mailing list in a while.
mattbillensteinover 13 years ago
That is clearly a freaking insane idea in a language as widely deployed as Python...
评论 #2981446 未加载
评论 #2980947 未加载
gtklockerover 13 years ago
I don't want to live in this planet anymore.
parover 13 years ago
The benevolent dictator for life has spoken!
drivebyacct2over 13 years ago
I hope it's obvious that it's a joke, but was the question serious is my concern.