Giter Club home page Giter Club logo

Comments (4)

jashkenas avatar jashkenas commented on June 25, 2024

Right, that's the problem -- it's already valid CoffeeScript. Aspects of this have been addressed in:
http://github.com/jashkenas/coffee-script/issues/closed#issue/16
Which deals with default arguments.

The problem with having things look like named arguments is that they're not, really. Instead of getting them as optional local variables within the function, you have to look inside of the options hash. I think that this is an important distinction to have, especially because there's no reason why CoffeeScript couldn't support real named arguments (if the ambiguity with the assignment syntax can be worked out).

from coffeescript.

weepy avatar weepy commented on June 25, 2024

TBH - I think it's best to avoid thing like this as it makes the model harder to understand. One of the nice things about Javascript is that there aren't too many rules about it's syntax.

from coffeescript.

jnicklas avatar jnicklas commented on June 25, 2024

You're both right, I'll close this issue. Missed the closed issue, sorry.

BTW: holy crap! splats! That's so awesome, CoffeeScript rocks!

from coffeescript.

jashkenas avatar jashkenas commented on June 25, 2024

It's all good. It's great to have this stuff on record, so people can read through the discussion. If you're looking to see what the limits of the syntax are, I'd recommend reading through the scripts in tests/fixtures/execution. That's the bulk of the current test suite -- each test should only compile lintlessly, and only ever print "true".

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.