Giter VIP home page Giter VIP logo

Comments (3)

dloscutoff avatar dloscutoff commented on June 27, 2024

After looking at some code-golf solutions, it seems like both changes would be helpful in some situations, but the for-loop change would be helpful more often. One issue there is that the destructuring for-loop header syntax F[abc]l{} would have to go away. But I don't think I've ever actually used that, and perhaps there could be a different command that still allowed it.

from pip.

dloscutoff avatar dloscutoff commented on June 27, 2024

Question: Should e, d, etc. from loops overwrite function arguments, or not? E.g. if we have loops nested three levels deep, should the third level assign its iteration count to c 1) under all circumstances, or 2) only when the current function received fewer than three arguments?

(Whichever behavior is the default, there could conceivably be a flag to use the opposite behavior. And there could conceivably be a warning message whenever there's a conflict.)

from pip.

dloscutoff avatar dloscutoff commented on June 27, 2024

I looked at a bunch of existing Pip golf solutions, and I believe not one of them would be harmed by loops setting local variables automatically. (There's a couple that are close, such as one that takes three arguments and has a doubly-nested loop.) So to answer the above question, I'd say do whatever's easiest to implement, and if it ever becomes a problem in the future, we can add options for working around it.

from pip.

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.