SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Technology Stocks : BORL: Time to BUY! -- Ignore unavailable to you. Want to Upgrade?


To: i-node who wrote (6890)10/25/1997 1:32:00 AM
From: Kashish King  Read Replies (2) | Respond to of 10836
 
Granted, pointers are easy-to-use, flexible and problem free in the hands of even a mildly competent C++ programmer, however, they are a royal pain in the butt if you ever find yourself having to reference count your classes. That, and rank-novice code butchery, is why classes that ought to be reference counted are not. AFA efficiency, why do you continue to hang on to the bogus notion that pointers are more efficient that references? Provided the intrinsic types are passed by value, as they are in Java, you lose nothing by tossing out pointers completely. In general, when you pass an object to another one you want it to operate on that object, not a copy of it (that's also the natural, intuitive behavior for, say, TrashCompactor.Crush(Junk)), and there's nothing stopping you from making a copy in the calling and/or called object if that's your intention. Are object's passed by value in C++? Think again, you don't know unless you know how the object was implemented, whether or not they have a copy constructor, et cetera. The bottom-line is you don't need or want pointers for 99.999999999999999999999999999999999 percent of code and I say that knowing that I have some of the 0.00000000000000000000001 code in which I absolutely need pointers which I can perform arithmetic on, and in the rare instance in which I need pointers to functions.