Giter Site home page Giter Site logo

20190809_KEW_comments about mod HOT 2 OPEN

iqis avatar iqis commented on August 26, 2024
20190809_KEW_comments

from mod.

Comments (2)

iqis avatar iqis commented on August 26, 2024

Code

  • showing my ignorance: Why do we have to quote a mod in drop() but not in use()? (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 by require() and library(). The drop() function has no comparable counterparts, and thus follow the function it calls: detach()
  • 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.

from mod.

wendtke avatar wendtke commented on August 26, 2024
  • showing my ignorance: Why do we have to quote a mod in drop() but not in use()? (e.g., drop("my_test_mod") vs. use(my_test_mod)

    • This is because use() attempts follow the convention set by require() and library().

Okay, that was my guess! Thanks!

from mod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.