Giter Site home page Giter Site logo

Comments (5)

michaelhkay avatar michaelhkay commented on July 1, 2024

[ 3, 4, 5 ](2, 1)

Did you mean that, or did you mean

[ 3, 4, 5 ]((2, 1))

Do you want it to be a variadic function with a variable number of arguments, or a function that takes an integer sequence as a single argument?

from qtspecs.

ChristianGruen avatar ChristianGruen commented on July 1, 2024

Glad you ask this question; it was mine as well:

  • From the non-expert user perspective (not knowing the fundamental details between lookups and function calls), the variadic variant would be more intuitive, ideally with a flattened result over the result of all arguments.
  • From the implementor perspective, a single argument would be easier to realize – and it would be less invasive, as it would allow us to introduce additional parameters in the future.

from qtspecs.

michaelhkay avatar michaelhkay commented on July 1, 2024

In general we made a decision in principle that functions should not do implicit mapping over their arguments. You can argue that map:get($map, $key) should do implicit mapping if $key is a sequence of keys, but you can equally argue that it should do implicit mapping if $map is a sequence of maps. So I suggest we don't do this.

As for $map($key) if we allow $key to be a sequence here then we have to revise the complex rules for the implicit type of the map as a function and therefore the subsumption rules for map types, which is a swamp I would rather not revisit.

from qtspecs.

ChristianGruen avatar ChristianGruen commented on July 1, 2024

Thanks for your assessment. I assume that only a minority of users would benefit from this, so I’d be happy to close it.

from qtspecs.

ndw avatar ndw commented on July 1, 2024

The CG agreed to close this issue without action at meeting 065

from qtspecs.

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.