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 | 27634 reads
|
Browse archives
Active forum topics |
Recent comments
22 weeks 6 days ago
23 weeks 1 hour ago
23 weeks 1 hour ago
45 weeks 1 day ago
49 weeks 3 days ago
51 weeks 9 hours ago
51 weeks 9 hours ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago