Giter Club home page Giter Club logo

Comments (5)

jashkenas avatar jashkenas commented on July 3, 2024

It needn't:

gold, silver, bronze: runners...

Multiple splats on the same line will look a little funky, but it's a small price to pay. This (ellipsis splats for function defs and calls, not exploded assignment) is now on master. Closing the ticket.

from coffeescript.

jashkenas avatar jashkenas commented on July 3, 2024

Just to read well. The * operator was alright, because of the kleene star connotation, but can look an awful lot like multiplication when skimming over code. I like the ... because it implies uncertainty about the length of the arguments.

family(mother, father, children...)

budget(food, shelter, misc_expenses...)

Also, I didn't realize this, but apparently it's the way to do splats in C and Java:
http://en.wikipedia.org/wiki/Ellipsis#In_programming

from coffeescript.

jashkenas avatar jashkenas commented on July 3, 2024

It's supported on the current master. I agree that it's not ideal, but still the better of the two options. Your first example compiles into this:

foo.apply(this, abc.concat([42]));

from coffeescript.

omni5cience avatar omni5cience commented on July 3, 2024

Sorry for commenting on a closed issue, but I followed a link here and I can't help but feel like this reads like one side of a conversation. Am I missing something obvious?

from coffeescript.

jashkenas avatar jashkenas commented on July 3, 2024

Huh. Maybe the other person deleted their github account? Or maybe it's a bug.

from coffeescript.

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.