Multi-assign

new topic     » topic index » view thread      » older message » newer message

For 4.1, I started working on multiple assignment. Basically, it would look like this:

{ x, y } = { 1, "foo" } 
 
{ $, x } = value( y ) 

It's really syntactic sugar, but can make some code a lot easier to read. My implementation currently uses dollar signs to ignore values. There's been some concern on the dev list that this might be confusing, so I'd like to get feedback from the wider community.

Does a dollar make sense? Should we use a different symbol? Should we just put extra commas in?

For those interested, the code is currently in the 'multi-assign' branch in the Mercurial repo.

Matt

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu