Giter Site home page Giter Site logo

Simplifying color argument about cowsay HOT 4 OPEN

sckott avatar sckott commented on June 3, 2024
Simplifying color argument

from cowsay.

Comments (4)

sckott avatar sckott commented on June 3, 2024

Thanks for your issue @ecrs98 ! I'm so glad it makes coding more fun.

What do you think @aedobbyn ? Does this seem like a good idea, and if so, can it be done easily?

from cowsay.

sckott avatar sckott commented on June 3, 2024

@ecrs98 let's wait a bit to see if amanda responds. if not soon, we can move ahead discussing this

from cowsay.

aedobbyn avatar aedobbyn commented on June 3, 2024

hi, so glad you like the package! so my first instinct here is that it would be possible to do of course, but that this argument would be redundant given that it's covered by the other two already there so i don't love it design-wise. what do you think @sckott?

from cowsay.

sckott avatar sckott commented on June 3, 2024

Thanks @aedobbyn ! One idea is we could do in the function definition

say <- function(what="Hello world!", by="cat",
                type=NULL,
                what_color=NULL, by_color=what_color, <--------- 
                length=18, fortune=NULL, ...) 

Where we set by_color to be whatever is set in what_color UNLESS by_color is set to something by the user. NULL is still the default for by_color here.

I agree I don't think we should add a new parameter.

from cowsay.

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.