I don’t know why you’re using C++ (or, for that matter, why you think C++ is “strongly typed”) but I strongly suspect you could be taking a better approach here. Don’t mean this as snark, and I’m happy to help / pair-program if you like!
-
-
Replying to @NateMeyvis
I'm using C++ to write a specific routine that is very computationally intensive because I can interface with R thanks to Rcpp and C++ is definitely more strongly typed than R.
1 reply 0 retweets 1 like -
Replying to @phl43
Kudos to you for doing quantitative work, really. I'll bet you a dollar a pair of professional eyes could help (and I'm willing to be those eyes). And yes, I agree with your last claim, but it doesn't make C++ "strongly typed."
1 reply 0 retweets 1 like -
Replying to @NateMeyvis
The routine itself is not very complicated, just computationally demanding, so what I could have used help with is Rcpp and RcppArmadillo, but it's working now so it's all good. As for whether C++ is "strongly typed", my impression is that there is no universally accepted
1 reply 0 retweets 0 likes -
Replying to @phl43 @NateMeyvis
definition of this concept and that different people use it differently. But whatever I'm not hung up on the terminology, what I meant is just that C++ is strongly typed enough that the sort of things I described in my tweet can happen. In any case, I'll publish my code along
1 reply 1 retweet 1 like -
Replying to @phl43 @NateMeyvis
with the write-up, so if you want to have a look at it and offer advice I'd be grateful.
1 reply 0 retweets 1 like -
Replying to @phl43
Sounds good! Just FWIW, I’ve gotten into trouble before making assumptions about operator behavior from how strongly typed I thought the language to be.
1 reply 0 retweets 1 like -
Replying to @NateMeyvis @phl43
(E.g.: if you use Python 2, don’t think that the language’s weak typing entails that division of integers isn’t integer division!)
1 reply 0 retweets 1 like -
Replying to @NateMeyvis
Fair enough, I don't know Python, but I guess you could have a language that is weakly typed in some sense and yet has that kind of behavior. In that case though, it would have helped me if I had immediately made the inference C++ is strongly typed -> it performs integer division
1 reply 0 retweets 0 likes -
Replying to @phl43 @NateMeyvis
when you divide 2 integers (even if that doesn't follow), because I would have identified the cause of the problem much faster!
1 reply 0 retweets 0 likes
Sure. I'm really not trying to be pedantic--I'm just guessing that relying on that kind of heuristic will do you more harm than good overall, even if it would have helped this time. With all respect, factoring and testing your code properly is much faster and more reliable!
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.