Hi all,
I've got quite a bit of background in programming. A few semesters ago I took a course in 'Statistical Computing' and we worked with C in that class. C is ok but if you've ever dealt with it you know the frustrations that can come with it. The main reason why I would use C is to make calls to C functions that I've written to speed up some code. So I've been reteaching myself some C lately. The thing is that I've been hearing quite a bit about C++ and Rcpp. I've always been under the impression that C is faster code. It's closer to the machine. However what I've been reading lately seems to contradict that. Not that C++ will allow my stuff in R to be faster than C but that's it's comparable. And since it has better libraries to make your life easier you don't mess up when writing the code as much.
Of course with a more complex language there is more time you have to spend to learn it.
My question is if anybody has any opinion on this. Pretend that I don't have any C background and I'm debating whether to learn C or C++ where my goal is to interface with R.
I've got quite a bit of background in programming. A few semesters ago I took a course in 'Statistical Computing' and we worked with C in that class. C is ok but if you've ever dealt with it you know the frustrations that can come with it. The main reason why I would use C is to make calls to C functions that I've written to speed up some code. So I've been reteaching myself some C lately. The thing is that I've been hearing quite a bit about C++ and Rcpp. I've always been under the impression that C is faster code. It's closer to the machine. However what I've been reading lately seems to contradict that. Not that C++ will allow my stuff in R to be faster than C but that's it's comparable. And since it has better libraries to make your life easier you don't mess up when writing the code as much.
Of course with a more complex language there is more time you have to spend to learn it.
My question is if anybody has any opinion on this. Pretend that I don't have any C background and I'm debating whether to learn C or C++ where my goal is to interface with R.