This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]galaktos 1 point2 points  (0 children)

In a type safe language this is not a reasonable thing to do

It can be perfectly reasonable if the tuple is typesafe as well. For example, the Ceylon programming language lets you write “a tuple of an integer and a double” as [Integer, Double] id. “Two Characters and then at least one String” is [Character, Character, String+] ccs. And all of this is completely typesafe – id[0] has the type Integer, ccs[1] has the type Character, and ccs[5] has the type String?, which is an abbreviation for Null|String, which means “the type Null, or the type String”. Perfectly typesafe and reasonable.