Giter VIP home page Giter VIP logo

Comments (3)

dwog avatar dwog commented on May 29, 2024 2

Thank you for the feedback. While merging the functions is not impossible -- in fact, that indeed was the original idea -- for the very valid concern that it could and will present an issue with Toaststunt's current limitations, I would argue that doing so would actually reduce complexity and maintenance.
Such a function possessing numerous responsibilities would inherently become unwieldy, especially when you consider adding yet more behavior. Generally accepted design patterns encourage short -- focused functions in place of lengthy ones. Which is not to say there should never be exceptions, but rather to explain the thought-process behind it.
I do agree that space should be left in the implementation for eventually specifying protocol(HTTP, FTP, GOFER, IMAP... etc) and welcome more discussion on how we could make that a reality. Adding additional arguments? With all that above stated, I am open to discuss and adjust accordingly.
If you were curious where I drew my design concepts from: https://google.github.io/styleguide/cppguide.html

from toaststunt.

distantorigin avatar distantorigin commented on May 29, 2024 1

Merging these into a single builtin would be more ideal for reduction of complexity, maintenance, and the currently imposed function table limit. There are other options that we may want from curl in the future outside of HTTP methods as well; as such, I propose converting the second argument in the curl() builtin to an option map instead, where these changes to the behavior can be defined. include_headers can be folded into this second argument.

from toaststunt.

tvdijen avatar tvdijen commented on May 29, 2024 1

I was thinking the exact same thing as what @distantorigin has written. Single function with an options-map that resembles curl-parameters

from toaststunt.

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.