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 | 27607 reads
|
Browse archives
Active forum topics |
Recent comments
20 weeks 1 day ago
20 weeks 1 day ago
20 weeks 1 day ago
42 weeks 2 days ago
46 weeks 4 days ago
48 weeks 1 day ago
48 weeks 1 day ago
50 weeks 6 days ago
1 year 3 weeks ago
1 year 3 weeks ago