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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Re: Linux 3.0-rc3 "In other words: don't be stupid."

38 点作者 dmuino将近 14 年前

4 条评论

jholman将近 14 年前
It's worth reading one of the other comments in that thread, by the person who Linus is replying to:<p><a href="https://lkml.org/lkml/2011/6/14/192" rel="nofollow">https://lkml.org/lkml/2011/6/14/192</a><p>And/or a clarification someone else gave to Linus:<p><a href="https://lkml.org/lkml/2011/6/15/38" rel="nofollow">https://lkml.org/lkml/2011/6/15/38</a><p>The code in question is for parsing command-line arguments, and its goal is to determine if the user was specifying an (optional) kernel version. When the goal is to guess what a user is intending, you're inherently dependent on _name_ of the version, not its features. And, contrary to what Linus says, you care just as much about future versions as old ones.<p>So Linus's criticism is <i>almost entirely wrong</i>, for the actual use-case of the author of this request. There are other alternate criticisms, perhaps, and of course Linus's criticism does apply to most people who write "check this version" code.
wccrawford将近 14 年前
He's got a really good point about version number checking being for supporting old versions, not new ones.<p>I suppose it's probably that quotes are selected for their brilliance, but bits of logic like Linus' in that post always awe me. They're so simple and right when you hear them, but you didn't think of them yourself.
评论 #2658565 未加载
评论 #2658412 未加载
gravitronic将近 14 年前
Can anyone paste the content in a comment? lkml.org's not responding...
评论 #2657929 未加载
评论 #2657721 未加载
shazow将近 14 年前
This is perfectly analogous to websites checking for specific browser versions.<p>So many websites exist where you'll browse with Chrome or Firefox and you'll get a big red "Looks like you're using an old version of Internet Explorer, please upgrade to IE6 or newer" just because they're checking your user-agent header rather than availability of specific features. This is what Linus is trying to avoid in the Linux ecosystem—a noble cause.