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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Project Valhalla, Simple as it can be, but not simpler

97 点作者 pmg1991将近 2 年前

6 条评论

canvascritic将近 2 年前
The shift in valhalla's direction reminds me of the initial challenges i faced when experimenting with its early prototypes. i distinctly remember grappling with the introduction of q-types and v-bytecodes and trying to align it with my existing understanding of the jvm. it's interesting to see how the design is evolving towards expressing struct-like values as normal java classes. from my own tinkering with valhalla, the convergence towards a more streamlined approach without losing out on performance seems promising. curious to see how these changes will play out in real world applications, especially considering the nuances of java's memory model and optimization techniques.
quelltext将近 2 年前
From the start I was wondering if there&#x27;s no way for the JVM to solve this with less cruft on the bytecode level. Of course, that doesn&#x27;t mean I was aware of the challenges, just an intuition.<p>I do think they must have had similar intuitions in the beginning. Then identified big challenges with that and that what would be needed to overcome it more streamlined is some set of features or optimizations. It seems though that these emerged in isolation? At least to cross the threshold to saying &quot;there&#x27;s a way&quot;.<p>Seeing how long Valhalla has been in development, I&#x27;m curious how things went the way they did. The article mentions hindsight but that alone doesn&#x27;t explain the change in direction.
评论 #37197503 未加载
评论 #37199789 未加载
nyanpasu64将近 2 年前
Well I suppose that if you treat value types like a variation of an object reference rather than a variation of an object, then it would make sense that they cannot be mutated (since neither can object references but only their targets), with the added wrinkle of allowing such mutation during value constructors. To me this still feels less general than C or Go structs, which can have individual fields mutated in place (and even take the address of stack variables and pass pointers around, though that&#x27;s unsafe in C and may require heap&#x2F;GC allocation in Go unless escape analysis proves otherwise).
akkad33将近 2 年前
I haven&#x27;t read the article fully, but can anyone please explain why value types seem so much more complicated in the JVM than DotNet, where they have had it for a long time?
评论 #37197738 未加载
评论 #37197834 未加载
评论 #37199573 未加载
评论 #37197754 未加载
评论 #37201494 未加载
评论 #37197999 未加载
smallnix将近 2 年前
I understand it&#x27;s in jest but I don&#x27;t think Einsteins version &quot;blew it&quot;. The simplified (and definitely catchier) aphorism misses to explain what the criterion for enough or not enough is.
melenaboija将近 2 年前
A little bit off topic but this is another challenging Project Valhalla:<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=XL2zzFaybdE&amp;ab_channel=EduMar%C3%ADn">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=XL2zzFaybdE&amp;ab_channel=EduMa...</a>