Closed AndreMikulec closed 6 years ago
I like your proposal. However, also other operators like %S<
should be overloaded too. Could you prepare a pull request (operators' definitions and updated manual). Thanks!
O.K. I will start working on that. Work will use up some time though.
no worries, take your time, I'm busy too..
I gave it a thought, I want to keep the behavior consistent with, among others;
> c() + 1
numeric(0)
> NULL + 1
numeric(0)
but stri_paste
has had the ignore_null
arg for a long time
%s+%
supposed to perform string concatination. It does not always do that.This happens because one side ( eithor left or right ) is returning NULL. The output is correct (as far as I know) behaviour.
I recommend (feature request) that a safer concat operator be added.
Since situations are cumbersome to program 'around' these 'correct cases', I recommend that a safer concatenation infix operator be added to stringi. Call it 'Capital S plus.'
This is what I use in my own work.
Just my two cents. Andre Mikulec