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 :)
April 13th, 2005 at 11:04 am
I know next to nothing about C#, but would value types mean you could have a destructor?
God, I miss destructors.
April 13th, 2005 at 6:07 pm
No; it’s more like alloca()…
April 14th, 2005 at 12:01 am
shaug, I’m curious, what do you want about destructors that finalize() doesn’t provide?
April 14th, 2005 at 3:27 am
Amen, Brother! Haven’t missed them once in 7 years or so of Java programming!
April 15th, 2005 at 9:52 am
I’m a newbie where can I find out more about value types?
thanks
October 2nd, 2006 at 2:36 pm
Hi, cool site. I really like it.
http://newestringtones.awardspace.com/free_cell_phone_ringtones/ free cell phone ringtones http://newestringtones.awardspace.com/free_120t_motorola_cell_phone_ringtones/ free 120t motorola cell phone ringtones http://newestringtones.awardspace.com/free_ringtones_for_cell_phone/ free ringtones for cell phone http://newestringtones.awardspace.com/motorola_cell_phone_ringtone/ motorola cell phone ringtone http://newestringtones.awardspace.com/free_ringtones_for_my_cell_phone/ free ringtones for my cell phone http://newestringtones.awardspace.com/download_free_cell_phone_ringtone/ download free cell phone ringtone http://newestringtones.awardspace.com/cell_phone_ringtone_for_an_nextel/ cell phone ringtone for an nextel http://newestringtones.awardspace.com/free_cell_phone_ringtones_download/ free cell phone ringtones download http://newestringtones.awardspace.com/cell_free_phone_ringtone/ cell free phone ringtone http://newestringtones.awardspace.com/cell_download_phone_ringtone/ cell download phone ringtone http://newestringtones.awardspace.com/cell_free_phone_ringtone_verizon/ cell free phone ringtone verizon http://newestringtones.awardspace.com/cell_download_free_phone_ringtone/ cell download free phone ringtone http://newestringtones.awardspace.com/cell_free_phone_ringtone_wallpaper/ cell free phone ringtone wallpaper http://newestringtones.awardspace.com/cell_phone_ringtone_verizon/ cell phone ringtone verizon http://newestringtones.awardspace.com/alltel_cell_phone_ringtone/ alltel cell phone ringtone http://newestringtones.awardspace.com/cell_free_motorola_phone_ringtone/ cell free motorola phone ringtone http://newestringtones.awardspace.com/cell_phone_ringtone_wallpaper/ cell phone ringtone wallpaper http://newestringtones.awardspace.com/alltel_cell_free_phone_ringtone/ alltel cell free phone ringtone http://newestringtones.awardspace.com/cell_free_phone_prepaid_ringtone/ cell free phone prepaid ringtone http://newestringtones.awardspace.com/cell_motorola_phone_ringtone/ cell motorola phone ringtone