We left off in a rather unsatisfying predicament, we can simulate OCaml functors with interfaces, but at the expense of passing in two type parameters and guarding all our functions with type constraints. Yuck!
|
||||||
|
We left off in a rather unsatisfying predicament, we can simulate OCaml functors with interfaces, but at the expense of passing in two type parameters and guarding all our functions with type constraints. Yuck!
We used a good old fashioned subtyping and a dash of parametric polymorphism to write an eval function capable of returning different types. But surely we gave up too easily on polymorphic return types in F#? I assure you we gave them the ol’ college try.
|
||||||
|
Copyright © 2010 Do Loop Until You Die - All Rights Reserved |
||||||