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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Modern programming languages require generics

29 点作者 ayende将近 3 年前

5 条评论

adrianmsmith将近 3 年前
This is a great article but... it may be just me but I&#x27;m allergic to the word &quot;modern&quot;. I feel it&#x27;s a word trying to manipulate my emotions (who wants to be out-of-date?) without actually contributing anything objective to the discussion. For example the sentence<p>&gt; A modern language that is aiming for performance should take this very important aspect of language design into account.<p>could have been rewritten as<p>&gt; A language that is aiming for performance should take this very important aspect of language design into account.<p>and been clearer and more objective for it.
评论 #31486450 未加载
评论 #31480262 未加载
评论 #31480415 未加载
Rochus将近 3 年前
I agree; there are a lot of reasons to have generics in a language, performance one of them as demonstrated; but anyway it doesn&#x27;t make sense if in a strictly, statically typed language we are forced to do dynamic typing to make data structures and algorithms reusable; however, i don&#x27;t understand why everyone always goes for generic types; generic modules can do that too and are much easier to understand and implement.
评论 #31477849 未加载
评论 #31477345 未加载
zokier将近 3 年前
&gt; The counter for this argument is that we can always specialize the code for our needs, right? Except… that this isn’t something that happens.<p>This feels like a weird assertion, especially when immediately followed by an example where such manual specialization happens
UncleEntity将近 3 年前
I guess nobody would call it “modern” but it is quite possible to have the compiler do type inference and automagically specialize functions with the user not even knowing it is happening behind the scenes. No generics needed.
评论 #31480174 未加载
nfbyte将近 3 年前
This is such crap. Modern programming languages (or any other tools) need to be well suited for a specific problem domain, not meet some generalized arbitrary criterion. And modern systems (as in actual low-level software, not web browsers or databases or games) suffer from a severe lack of security and reliability, not performance.
评论 #31477892 未加载