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.

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

97 pointsby pmg1991over 1 year ago

6 comments

canvascriticover 1 year ago
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.
quelltextover 1 year ago
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 未加载
nyanpasu64over 1 year ago
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).
akkad33over 1 year ago
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 未加载
smallnixover 1 year ago
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.
melenaboijaover 1 year ago
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>