User loginNavigation |
Different approaches to letting a programmer define interface implementations.I'm looking at how different statically typed languages tackle the problem of letting you define types and define interface implementations for those types. For example, to define an implementation of interface I for type T, Java uses interface methods, Haskell uses typeclasses, Scala uses implicits. The disadvantage of the Java approach when compared with Haskell/Scala:
Haskell approach vs Scala approach:
What do you think is the "right" way to do this? Given my limited knowledge right now, I think I'd go with something Scala-like and maybe make some modifications. For example, I think the "only one implementation per type" restriction of Haskell might be useful. Is there a good survey of the different approaches? By Kannan Goundan at 2013-12-30 15:15 | LtU Forum | previous forum topic | next forum topic | other blogs | 27613 reads
|
Browse archives
Active forum topics |
Recent comments
21 weeks 17 hours ago
21 weeks 21 hours ago
21 weeks 21 hours ago
43 weeks 2 days ago
47 weeks 4 days ago
49 weeks 1 day ago
49 weeks 1 day ago
51 weeks 6 days ago
1 year 4 weeks ago
1 year 4 weeks ago