The Artima Developer Community
Sponsored Link

Java Buzz Forum
Value types in Java: Striving for the stack

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
Value types in Java: Striving for the stack Posted: Apr 13, 2005 8:25 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: Value types in Java: Striving for the stack
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement

I have recently had some .NETers claiming that they do now know how we live on our side of the fence in Java-land, without value types. They laugh in our general direction as they add structs to the stack.

I do understand that value types can be useful. I do understand that it will take longer to dereference an object each time vs. not having to do that bypassing the heap entirely. There are lots of good things there.

However, I am actually quite glad that we don't have value types. Simple put: Have you missed them? I haven't! I haven't run into a performance or scalability issue that was profiled, and the result was "man if we could just put this String on a stack we would be fine". It just hasn't been a problem.

On the other side, if you flip through Effective C#, you see items dedicated to value vs. reference types. Sneaky methods like EqualsReferences vs. EqualsValues. Subtle differences. Common mistakes.

So, give me partial classes, and true delegates, but keep your value types :)

Read: Value types in Java: Striving for the stack

Topic: High Speed Hotel Internet access ... i'll be the judge of that Previous Topic   Next Topic Topic: Are Hippies all that's left?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use