140 reputation
3
bio website
location Huntsville, AL
age 31
visits member for 3 years, 10 months
seen Jan 28 '11 at 7:23

Oct
2
comment Which language features are considered harmful?
-1. There is a reason you need ptr arithmetic: Iterating a point is fast than indexing. for(int i=0;i<SIZE;++i) ++arr[i] is slower than for(int*i=arr;i<arr+SIZE;++i)*i++. All java managed to prove is that you do need pointer, or have you never looked at sun.misc.Unsafe? If you don't need pointers, please explain how to write a generic swap function using Java. (e.g. int a=1,b=2; swap(a,b); assert( a==2 && b==1); ). Not to mention all the problems in c/c++ you'd have if you HAD to use references. How would you call a virtual function on an opaque struct w/o pointers?