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.

Modern programming languages require generics

29 pointsby ayendeabout 3 years ago

5 comments

adrianmsmithabout 3 years ago
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 未加载
Rochusabout 3 years ago
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 未加载
zokierabout 3 years ago
&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
UncleEntityabout 3 years ago
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 未加载
nfbyteabout 3 years ago
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 未加载