Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not sure to get the Tuple (#347) ... Why not use an anonymous type or the already existing Tuple class ?


Anonymous types can't be returned from a method. Well, they can, but not with any kind of safety (casting to object, or dynamic). Using tuples is all about representing a type by its 'shape', not its name. With anonymous types there's no shape declaration; but I could imagine that it would be useful for C# to allow implicit casting of anonymouse types to tuples (where the shapes are equal).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: