Comments (2)
Code
-
showing my ignorance: Why do we have to quote a mod in
drop()
but not inuse()
? (e.g.,drop("my_test_mod")
vs.use(my_test_mod)
- Ideally both would take character strings. The user may supply bare symbol as argument, because
use()
attempts follow the convention set byrequire()
andlibrary()
. Thedrop()
function has no comparable counterparts, and thus follow the function it calls:detach()
- Ideally both would take character strings. The user may supply bare symbol as argument, because
-
in the 'refer()' documentation or warnings (beyond default), it would be useful to let the user know that
refer()
will mask assignments from the previous module.
e.g.,- This is a good idea. The Tidyverse is sporting a verbose style to help the interactive user, too. I'll think about this and balance it with the R tradition of keeping mouth shut when nothing goes wrong.
my_other_test_mod <- mod::module({
refer(my_test_mod)
a <- 1
b <- 2
})
- In regard to above comment, you might also consider an implementation tool that helps the user compare the contents of each module before a mask occurs. I am reminded of the option to compare versions within Microsoft. Would a function that compares the contents of two modules be feasible?
- I think this would not be very necessary, as the user can simply do:
ls(mod_b) %in% ls(mod_a)
or something similar to get an idea for name conflict. The user is also expected to be familiar with the contents of either modules if he had created them.
- I think this would not be very necessary, as the user can simply do:
from mod.
showing my ignorance: Why do we have to quote a mod in
drop()
but not inuse()
? (e.g.,drop("my_test_mod")
vs.use(my_test_mod)
- This is because
use()
attempts follow the convention set byrequire()
andlibrary()
.
Okay, that was my guess! Thanks!
from mod.
Related Issues (20)
- On scoping
- package name: mo, mod, modu? HOT 1
- Take the very long README apart as vignettes.
- Complete documentations and build site with pkgdown
- allow acquire()ing packages? HOT 1
- Why mod::ule does not support rename on every front
- 20190808 CRAN Feedback HOT 1
- caching of modules in global environment
- De-emphasis source_module() HOT 2
- You know you're serious about a package when you make a hex logo for it.
- Should modules know the where it lives?
- Ban `<<-`
- Benefit of module over packages
- When to use `mod` or `R6`
- Name the enviroments which `private` attaches to
- add version() support inside module definition
- check if refer() retains functions' environments...
- implement a search path for loading modules
- On emulating OO behavior in a FP language HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mod.