One of the few places where I wish Scala's type system were _more_ powerful: existential types.
@jco @Eigenvariable yeah - I feel like scala probably provides the tools to do what you need in most of these cases but not elegantly.
-
-
@jco@Eigenvariable and for me anyway it's right on the edge of "I have no idea what I'm doing but can poke at it til it works" territory -
@avibryant@jco I understand the theory of existential types pretty well, and AFAICT Scala is simply missing a very important primitive. -
@Eigenvariable well, like@jco says, it provides it via type members. That's just hella awkward sometimes. -
@Eigenvariable@jco (but also I *don't* have a good grasp of theory so am probably missing something :) -
@avibryant@Eigenvariable Jeff, dunno if you can be bothered, but a gist of what you wished you could do and what you actually did would be+ -
@avibryant@Eigenvariable interesting -
@jco@avibryant I'll see what I can come up with. Basically I have a list whose elements all have abstract types... -
@jco@avibryant and I want to iterate over that to return a function whose type is calculated in terms of the elements of the list. - 7 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.