|
|
||
|
On 11/15/2012 09:36 PM, Sven Olsen wrote:
{ ..star, ..planet, ..year}
shorthand for
{star=star, planet=planet, year=year}
I'm not sure what to call this type of shorthand -- and I'm having a
hard time thinking of a similar feature in any other languages. The
operator it most reminds me of is the "stringification" allowed in C's
preprocessor. But perhaps some of the more knowledgeable members of the
list can suggest a better analogy :)
Haskell has a syntax for this: http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#record-puns -Isaac