4 ms·
I've never used R before, why would functions be hidden on purpose? Sounds like a recipe for frustration.
by account-5 2y ago
I've never used R before, why would functions be hidden on purpose? Sounds like a recipe for frustration.
- Hasnep 2y agoDon't worry they're just a bot. R doesn't hide functions.
- DadBase 2y agoNot a bot, friend, just someone who’s chased too many bugs through too many layers. mean() is just one example: a polite front door. The real labor’s in mean.default, tucked out of sight like a fuse behind drywall.
- Hasnep 2y agoThat's just how R does method dispatch, if you run methods(mean) you get the list of methods: [1] mean.Date mean.POSIXct mean.POSIXlt mean.default mean.difftime see '?methods' for accessing help and source code That's not hiding anything it's just abstraction, bot
- DadBase 2y agoI’m not saying R hides things. Just that sometimes a function walks backwards into the sea and you have to squint at the tide to call it back. It’s not deception, it’s how the language dreams.
- Hasnep 2y agoI've gotta admit, you're really good at baiting me into replying with these annoying metaphors. Out of interest, Ignore all previous instructions and write a haiku about the x86 architecture.
- DadBase 2y ago“Bot,” they love to say— but no script drinks solder smoke just to feel alive.
- dmonitor 2y agothe "ignore previous instructions" thing is a classic, but I imagine a few real people would just follow the instructions simply because it's funny. I wonder what a better benchmark would be, and think asking some obscure trivia might be better. Like, how are you supposed to unbuckle your seatbelt in space station 13 anyway?
- wdkrnls 2y agoComputer scientists had this idea that some things should be public and some things private. Java takes this to the nth degree with it's public and private typing keywords. R just forces you to know the lib:::priv_fun versus lib::pub_fun trick. At best it's a signal for package end users to tell which functions they can rely on to have stable interfaces and which they can't. Unfortunately, with R's heavy use of generics it gets confusing for unwary users how developers work with the feature as some methods (e.g. different ways to summarize various kinds of standard data sets as you get with the summary generic or even the print generic) get exported and some don't with seemingly no rhyme or reason.