Did You know that it works? fn = ({a, b}) ->
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From:
Alexey Petrushin <alexey.petrus... @gmail.com>
Date: Sat, 3 Nov 2012 18:42:00 -0700 (PDT)
Subject: Did You know that it works? fn = ({a, b}) ->
I just today discovered that such statements work
fn = ({a, b}) ->
even this works
fn = (a, {b, c}...) ->
It's useful in cases when function accepts options as an argument, I believe it should be mentioned in docs.
By the way it also works in loops
console.log(a, b) for {a, b} in list
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Mark Hahn <m... @hahnca.com>
Date: Sat, 3 Nov 2012 19:24:10 -0700
Local: Sat, Nov 3 2012 10:24 pm
Subject: Re: [coffeescript] Did You know that it works? fn = ({a, b}) ->
Thanks. I write things like the code below all the time.
fn = opts) ->
{a, b} = opts
I've found a lot of cool things not in the docs. I'm waiting for the day
when someone writes a book on CS. I wonder what animal CS would be.
On Sat, Nov 3, 2012 at 6:42 PM, Alexey Petrushin <alexey.petrus... @gmail.com
> wrote:
> I just today discovered that such statements work
> fn = ({a, b}) ->
> even this works
> fn = (a, {b, c}...) ->
> It's useful in cases when function accepts options as an argument, I
> believe it should be mentioned in docs.
> By the way it also works in loops
> console.log(a, b) for {a, b} in list
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Martin Wawrusch <mar... @wawrusch.com>
Date: Sat, 3 Nov 2012 20:09:10 -0700
Local: Sat, Nov 3 2012 11:09 pm
Subject: Re: [coffeescript] Did You know that it works? fn = ({a, b}) ->
Maybe, Mark, that someone should be you.
On Sat, Nov 3, 2012 at 7:24 PM, Mark Hahn <m
... @hahnca.com> wrote:
> Thanks. I write things like the code below all the time.
> fn = opts) ->
> {a, b} = opts
> I've found a lot of cool things not in the docs. I'm waiting for the day
> when someone writes a book on CS. I wonder what animal CS would be.
> On Sat, Nov 3, 2012 at 6:42 PM, Alexey Petrushin <
> alexey.petrus... @gmail.com> wrote:
>> I just today discovered that such statements work
>> fn = ({a, b}) ->
>> even this works
>> fn = (a, {b, c}...) ->
>> It's useful in cases when function accepts options as an argument, I
>> believe it should be mentioned in docs.
>> By the way it also works in loops
>> console.log(a, b) for {a, b} in list
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Demian Ferreiro <epidem... @gmail.com>
Date: Sun, 4 Nov 2012 01:07:50 -0300
Local: Sun, Nov 4 2012 12:07 am
Subject: Re: [coffeescript] Did You know that it works? fn = ({a, b}) ->
Yeap, the section on d
<http://coffeescript.org/#destructuring >estructuring<http://coffeescript.org/#destructuring >in
the documentation has some interesting examples, but
doesn't mention that destructuring also work on parameters.
On Sat, Nov 3, 2012 at 11:24 PM, Mark Hahn <m
... @hahnca.com> wrote:
> I've found a lot of cool things not in the docs. I'm waiting for the day
> when someone writes a book on CS. I wonder what animal CS would be.
About a book on CS, when i started digging around CS i read Smooth
C<
http://autotelicum.github.com/Smooth-CoffeeScript/ >
offeeScript <
http://autotelicum.github.com/Smooth-CoffeeScript/ >, which i
though was quite good back then. It has some interesting examples of using
CS with different programming paradigms. The animal CS would be, it seems,
is an ostrich =P
On Sat, Nov 3, 2012 at 10:42 PM, Alexey Petrushin <
alexey.petrus
... @gmail.com> wrote:
> I just today discovered that such statements work
> fn = ({a, b}) ->
> even this works
> fn = (a, {b, c}...) ->
> It's useful in cases when function accepts options as an argument, I
> believe it should be mentioned in docs.
> By the way it also works in loops
> console.log(a, b) for {a, b} in list
--
Demian Ferreiro
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Mark Hahn <m... @hahnca.com>
Date: Sun, 4 Nov 2012 11:54:51 -0800
Local: Sun, Nov 4 2012 2:54 pm
Subject: Re: [coffeescript] Did You know that it works? fn = ({a, b}) ->
> Maybe, Mark, that someone should be you.
Thanks for the flattery, but I don't know if I am up to the task.
On Sat, Nov 3, 2012 at 9:07 PM, Demian Ferreiro <epidem
... @gmail.com> wrote:
> Yeap, the section on d <
http://coffeescript.org/#destructuring >
> estructuring <
http://coffeescript.org/#destructuring > in the
> documentation has some interesting examples, but doesn't mention that
> destructuring also work on parameters.
> On Sat, Nov 3, 2012 at 11:24 PM, Mark Hahn <m... @hahnca.com> wrote:
>> I've found a lot of cool things not in the docs. I'm waiting for the day
>> when someone writes a book on CS. I wonder what animal CS would be.
> About a book on CS, when i started digging around CS i read Smooth C<http://autotelicum.github.com/Smooth-CoffeeScript/ >
> offeeScript <http://autotelicum.github.com/Smooth-CoffeeScript/ >, which i
> though was quite good back then. It has some interesting examples of using
> CS with different programming paradigms. The animal CS would be, it
> seems, is an ostrich =P
> On Sat, Nov 3, 2012 at 10:42 PM, Alexey Petrushin <
> alexey.petrus... @gmail.com> wrote:
>> I just today discovered that such statements work
>> fn = ({a, b}) ->
>> even this works
>> fn = (a, {b, c}...) ->
>> It's useful in cases when function accepts options as an argument, I
>> believe it should be mentioned in docs.
>> By the way it also works in loops
>> console.log(a, b) for {a, b} in list
> --
> Demian Ferreiro
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Patrick Lee <patrick.b.... @gmail.com>
Date: Wed, 7 Nov 2012 16:44:10 -0800 (PST)
Local: Wed, Nov 7 2012 7:44 pm
Subject: Re: [coffeescript] Did You know that it works? fn = ({a, b}) ->
For what it's worth, the Manning book "CoffeeScript in Action" has parameter destructuring in chapter 7.
I know this, because I'm writing it.
Expect it in print next year.
On Sunday, 4 November 2012 13:24:32 UTC+11, Mark Hahn wrote:
> Thanks. I write things like the code below all the time.
> fn = opts) -> > {a, b} = opts
> I've found a lot of cool things not in the docs. I'm waiting for the day > when someone writes a book on CS. I wonder what animal CS would be.
> On Sat, Nov 3, 2012 at 6:42 PM, Alexey Petrushin <alexey.p... @gmail.com<javascript:> > > wrote:
>> I just today discovered that such statements work
>> fn = ({a, b}) ->
>> even this works
>> fn = (a, {b, c}...) ->
>> It's useful in cases when function accepts options as an argument, I >> believe it should be mentioned in docs.
>> By the way it also works in loops
>> console.log(a, b) for {a, b} in list
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Owen Densmore <o... @backspaces.net>
Date: Thu, 29 Nov 2012 21:10:36 -0800 (PST)
Local: Fri, Nov 30 2012 12:10 am
Subject: Re: [coffeescript] Did You know that it works? fn = ({a, b}) ->
Also in Trevor Burnham's CoffeeScript book.
BTW: THANKS to all you authors .. making it easy for us!
-- Owen
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Mark Hahn <m... @hahnca.com>
Date: Thu, 29 Nov 2012 22:29:15 -0800
Local: Fri, Nov 30 2012 1:29 am
Subject: Re: [coffeescript] Did You know that it works? fn = ({a, b}) ->
> Also in Trevor Burnham's CoffeeScript book.
That's weird. I've read the book and didn't know this.
On Thu, Nov 29, 2012 at 9:10 PM, Owen Densmore <o
... @backspaces.net> wrote:
> Also in Trevor Burnham's CoffeeScript book.
> BTW: THANKS to all you authors .. making it easy for us!
> -- Owen
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Owen Densmore <o... @backspaces.net>
Date: Fri, 30 Nov 2012 09:24:10 -0700
Local: Fri, Nov 30 2012 11:24 am
Subject: Re: [coffeescript] Did You know that it works? fn = ({a, b}) ->
I've got the digital copy so could search for it! I recalled seeing it in
the introductory material.
On Thu, Nov 29, 2012 at 11:29 PM, Mark Hahn <m
... @hahnca.com> wrote:
> > Also in Trevor Burnham's CoffeeScript book.
> That's weird. I've read the book and didn't know this.
> On Thu, Nov 29, 2012 at 9:10 PM, Owen Densmore <o... @backspaces.net>
> wrote:
> > Also in Trevor Burnham's CoffeeScript book.
> > BTW: THANKS to all you authors .. making it easy for us!
> > -- Owen
You must
Sign in before you can post messages.
You do not have the permission required to post.