Closed DavePearce closed 8 years ago
From 0XX
benchmark series, have the following observations:
006_queens
uses a tuple (int,int)[]
.009_lz77
, 011_codejam
, 012_cyclic
use multiple return values.In 006_queens
the tuple is use to represent a position on the board:
type Pos is (int,int)
Realistically, this would be better anyway:
type Pos is {int x, int y}
One of the big challenges here, however, is: what type to give functions which return multiple values?
A few points on this:
Right, I'm closing this now as it's essentially now resolved. The remaining issues are split out separately into #566 (fields in invariants), #565 (multiple returns), #339 (flow typing field accesses), #552 (which should be reopened)
An interesting question is whether or not we can actually remove tuple types altogether. My reasoning for this is:
To support this, I think it would be quite useful to examine the use of tuple types in my benchmarks and test cases.