Type safety would make tuples far more powerful than their current
limitations. Structs are usually used for slightly more complex objects
compared to tuples and usually, you need them longer in memory. Tuples are
just for quick manipulation. Since you are interested in just the content
inside, you should be able to manipulate it quickly. Concrete examples
would be destructing JSON or manipulating any list. That manipulation
itself shouldn't be something used with Switch statements or require
multiple if let statements.

I'm actually not a fan of the C#'s implementation of tuples. Mainly because
they don't use optionals and the tuple implementation isn't very clean

var aTuple = Tuple.Create ("foo","bar",111)

The main problem is that Swift's tuples functionalities are very limited to
be able to use them.

-- 
Best Regards,

Muhammad T. Vali
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to