On Mon, Nov 26, 2012 at 3:52 PM, Davor Cubranic <cubra...@stat.ubc.ca>wrote:

> Is this macro intended to be used in other, similar contexts? Otherwise,
> why not have "switch" inside unique2, as in Hadley's original code?
>

Yes the idea was that if you had dozens of functions that had an identical
switch/case dispatch then you would have cleaner syntax + less bugs by
using a macro.

If this was a one-off then obviously the switch/case inline would have
indeed been more clear.
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to