| bio | website | example.com |
|---|---|---|
| location | Huntsville, AL | |
| age | 30 | |
| visits | member for | 2 years, 7 months |
| seen | Jan 28 '11 at 7:23 | |
| stats | profile views | 1 |
|
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? |
|
Oct 2 |
awarded | Critic |
|
Oct 2 |
awarded | Supporter |
|
Sep 26 |
awarded | Teacher |