Reply to post: Re: not-so-smart with pointers

Carnegie-Mellon Uni emits 'don't be stupid' list for C++ developers

Ken Hagan Gold badge

Re: not-so-smart with pointers

"While that's better than nothing it's certainly not as good as proper intrinsic types that can be checked by the compiler, generate efficient code and meaningful errors during compilation."

If your compiler cannot generate efficient code from source then you need a new compiler. If your language doesn't let you state the constraints that apply for given types, you need a new language. If you need more meaningful errors than "look at this line -> here" then you need a new programmer.

The advantage of implementing this stuff *outside* the language is that any third party can add to the toolbox. You don't need to wait for your compiler vendor to implement the feature and if you are trying to write portable code then you don't need to wait for *every* compiler vendor to implement the feature.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019