Stephan Soller <[email protected]> wrote:
However as soon as these fields are named it looks to me like an
ordinary structure. So why not just create something like an "anonymous
structure literal" that behaves to structures like anonymous functions
(or delegates) to functions?
Perhaps it would be possible to augment struct static initializers for
this purpose?
{ int a; string b } foo( ) {
return { 1, "text" };
}
I'm not sure if there are problems with this syntax (it sorta looks
like a delegate, for one), so elucidation would be welcome.
--
Simen