h*****n 发帖数: 38 | 1 为什么不用smart pointer,而要用pointer呢? | q*****g 发帖数: 72 | 2 ya, good question
all java "pointers" are smart pointers
but that's one reason java is slower than C++
【在 h*****n 的大作中提到】 : 为什么不用smart pointer,而要用pointer呢?
| h*****n 发帖数: 38 | 3 So, only for the performance sake?
【在 q*****g 的大作中提到】 : ya, good question : all java "pointers" are smart pointers : but that's one reason java is slower than C++
| t****t 发帖数: 6806 | 4 i guess c++ tries to imitate c while adding OO. pointer is inherited from c
and is closer to hardware behaviour (than smart pointers).
well there's trade off everywhere. c++ is just result of some trade off
between execution efficiency and developping efficiency. some language make
some job easy, while making some other job (nearly) impossible. some
language make all jobs equally difficult (or equally easy, depending on the
point of view).
smart pointer makes you safer since you don't have maint
【在 q*****g 的大作中提到】 : ya, good question : all java "pointers" are smart pointers : but that's one reason java is slower than C++
|
|