Re:How would you change your favorite programming language t...
by Miky on Sunday December 11, 2011 @06:58PM
(#3341561)
I was under the impression that you could already do that in Ruby, although I don't use it much and very well could be wrong.
Edit: Never mind, I just tried it and got an error.
Weird. I could have sworn I'd seen it done somewhere.
Re:How would you change your favorite programming language t...
by raganwald on Sunday December 11, 2011 @07:11PM
(#3341595)
That falls out of destructuring, so if you order def foo(@bar) now, we'll throw in a free
{@kbar, fu: @bar, blitz: [@first, @rest...]} = someHash
At no extra charge.
Re:How would you change your favorite programming language t...
by ericb on Monday December 12, 2011 @07:07AM
(#3343291)
Perhaps it is the wording, but I actually have no understanding of what you just said. I'm interested though, so can you expand on that a bit?
Re:How would you change your favorite programming language t...
by raganwald on Monday December 12, 2011 @11:13AM
(#3343911)
CoffeeScript implements def foo (@bar, @blitz) using destructuring assignment, a general facility that applies to assignment statements, not just function calls.
Oh, also I'd make binding_of_caller work.