syntax, lang = 'sweet', 'ruby'

check this syntactical sugar from ruby:

@title, @mood, @fulltext = title, mood, fulltext

(Example from _why's amazing online Ruby tutorial: 'Try Ruby in your browser')

Love it!

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."

 

My book "Choose Your First Product" is available now.

It gives you 4 easy steps to find and validate a humble product idea.

Learn more.

(By the way, I read every comment and often respond.)

Your comment, please?

Your Name
Your Url (optional)
Note: I may edit, reuse or delete your comment. Don't be mean.