syntax, lang = 'sweet', 'ruby'
check this syntactical sugar from ruby:
@title, @mood, @fulltext = title, mood, fulltext
any chance that 'multiple assignments' can be added to C#? How about VB.Net.Next, hey paul?
Here's an explanation of the above syntax, taken from the Ruby spec:
" Multiple assignment form performs multiple assignment from expressions or an array. Each left hand side expression must be assignable. If single right hand side expression given, the value of the expression converted into an array, then each element in array assigned one by one to the left hand side expressions. If number of elements in the array is greater than left hand sides, they are just ignored. If left hand sides are longer than the array, nil will be added to the locations."Next → ← Previous
I'm currently writing a book about how to build your first product. If you want to build your first product, please sign up to be notified when the book is available.