the syntax you are proposing is very similar to GoLang multiple return values:2 days ago, BitFlipper wrote
Or maybe a bit cleaner way to do it...
1234567891011121314151617publicclassOperation{public<intRunCount, TimeSpan MaxTime, TimeSpan MinTime, TimeSpan AvgTime> Statistics{get{lock(m_lock){varretVal =newreturn();retVal.RunCount = m_runs;///etc...returnretVal;}}}}The "new return()" statement means to instantiate whatever the return type of the current method is. The compiler should be able to infer this from the current method's return type just like it can infer a type when assigning to var from the return of a method. Also there is no Tuple type, just an anonymous type as the return type.
I'm no LINQ expert but isn't this very similar to how LINQ does its magic?
func (file *File) Write(b []byte) (n int, err Error)