Giter Site home page Giter Site logo

Comments (4)

rrrene avatar rrrene commented on May 8, 2024

That's a valid argument.

I am a bit uncertain whether or not to keep these checks at all. Originally you could write something like

defp server(https \\ false) do
  # ... code ...
end

# somewhere in a function:
server = server(true)

Now, with a regular call to server it might have become unclear if you were calling the variable or the function (using default arguments). But since Elixir 1.2 you would have to call server() to call the function, so this check might be outdated ...

Long story short, you're suggestion to check the arity is a very good one to solve those problems. ๐Ÿ‘

from credo.

philipgiuliani avatar philipgiuliani commented on May 8, 2024

Woho, awesome! :)

from credo.

rrrene avatar rrrene commented on May 8, 2024

v0.4.5 is live and contains this fix.

from credo.

net avatar net commented on May 8, 2024

Yay!

from credo.

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.