2 ms·
It is definitely going to change at some time, IBM already has a prototype of JVM supporting object packing and fine-grained alignment control. shared_ptr use
by pkolaczk 13y ago
It is definitely going to change at some time, IBM already has a prototype of JVM supporting object packing and fine-grained alignment control.
shared_ptr use is limited because shared_ptr is slow and people learned to avoid it at all cost. But having to think about ownership influences design choices and often makes things more complex and less performant that needed (e.g. it often forces to copy objects instead to just pass a pointer).
- vinkelhake 13y agoThinking about ownership is something that is natural for C++ programmers and will naturally affect design choices. We (C++ programmers) don't avoid shared_ptr at all costs and the primary reason for avoid it is because it muddles ownership semantics. In other words: if a magical zero-cost shared_ptr implementation appeared, we wouldn't start using it everywhere. You can keep extolling the virtues of Java performance, but fact remains that Java doesn't see much use in areas where performance is critical. It doesn't mean Java doesn't have a use, it's just not there.
- pkolaczk 13y ago> Thinking about ownership is something that is natural for C++ programmers and will naturally affect design choices Maybe this is the reason C++ guys always complicate things: http://www.johndcook.com/blog/2011/06/14/why-do-c-folks-make-things-so-complicated/ http://www.johndcook.com/blog/2011/06/14/why-do-c-folks-make... As of Java being not-performant enough: that's why Java is used as one of the most popular language for implementation of modern NoSQL databases systems. Everyone knows performance doesn't matter in databases. ;)