Dasonk / docstring

Provides docstring like functionality to R functions without requiring the need to create a package.
57 stars 6 forks source link

Minor refactor of question mark. #8

Closed nfultz closed 7 years ago

nfultz commented 7 years ago

Sorry about all the whitespace diffs, my editor does that automatically.

Dasonk commented 7 years ago

Your way of checking is much cleaner. I haven't tested any of this yet but does it make sense to turn ? into S3? The way the interpreter deals with it means that everything being passed into it will end up being symbols pretty much.

Dasonk commented 7 years ago

I'll say that my original idea was to use S3 but it seems more complicated than necessary and since there is interpreter magic going on behind the scenes it doesn't seem to add much. I'll check out your code when I have some time though and see what the advantages to going that route would be.

nfultz commented 7 years ago

It's a bit broken right now, the non-standard evaluation doesn't play nicely with s3. Just an Idea expressed as a PR.

Dasonk commented 7 years ago

I kind of thought so. Like I said there is interpreter magic going on with ? so it's not the cleanest. I do like your first commit cleaning up all of the checking though and will most likely incorporate that. Could you re-PR just the first commit? Although if you're gonna do that why not add your info into the DESCRIPTION as a contributor.

nfultz commented 7 years ago

Sure, no problem.